MariaDB is available under the terms of the GPL v2 license, just like MySQL.
Some parts of the code use the BSD license or are public domain. See the header files for details.
There are also the MariaDB Connector/C, MariaDB Connector/ODBC and MariaDB Connector/J client libraries, released with the GNU LGPL 2.1 license. Also, an old LGPL client library for MySQL 3.23 exists.
If you want to be part of the MariaDB community and donate code to the MariaDB project, then you need to give the code to the project under BSD-NEW or sign and email the MariaDB Contributor Agreement. See the MCA FAQ for more information on why we ask for copyright assignment.