MariaDB it's a MySQL fork. According to the wikipedia page, "MariaDB intends to maintain high compatibility with MySQL, ensuring a "drop-in" replacement capability".
That means that if CakePHP supports MySQL, then it supports MariaDB. No problem changing one for another.
Obviously I can be wrong, but my knowledge with MySQL leads me to believe that.
If I'm not wrong, configuring cakephp to use mysql and configuring the system to use mariadb should not be a problem.