MariaDB Server is licensed as GPLv2, while MySQL has two licensing options – GPLv2 (for Community edition) and Enterprise. The main difference between the two licenses for MySQL is the available features and support. While you receive the full-featured package when using MariaDB, that's not the case with MySQL.
MariaDB: Since MariaDB is a fork of MySQL, the database structure and indexes of MariaDB are the same as MySQL. This allows you to switch from MySQL to MariaDB without having to alter your applications since the data and data structures will not need to change. ... client protocols, structures, and APIs are identical.