Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What's the difference between MariaDB and MySQL? I'm not very familiar with both. I'm primarily a front end developer for the most part.

Are they syntactically similar? Where do these two query languages differ?

Wikipedia only mentions the difference between licensing:

MariaDB is a community-developed branch of the MySQL database, the impetus being the community maintenance of its free status under GPL, as opposed to any uncertainty of MySQL license status under its current ownership by Oracle.

share|improve this question
up vote 23 down vote accepted

MariaDB is a backward compatible, binary drop-in replacement of MySQL. What this means is:

  • Data and table definition files (.frm) files are binary compatible.
  • All client APIs, protocols and structs are identical.
  • All filenames, binaries, paths, ports, sockets, and etc... should be the same.
  • All MySQL connectors work unchanged with MariaDB.
  • The mysql-client package also works with MariaDB server.

In most common practical scenarios, MariaDB version 5.x.y will work exactly like MySQL 5.x.y, MariaDB follows the version of MySQL, i.e. it's version number is used to indicate with which MySQL version it's compatible.

MariaDB originated as a fork of MySQL by Michael "Monty" Widenius, co-founder of MySQL Ab (and original developer of MySQL) and his new company Monty Program Ab acts as the main steward of MariaDB. Monty Program Ab is owned by its employees, and several of them are MySQL core developers. Several of Monty Program Ab partners that are involved with MariaDB used to be involved (or still are) with MySQL.

The main motivation behind MariaDB is to provide a floss version of MySQL, in case Oracle goes all corporate with MySQL. It's worth noting that Monty was vocal against MySQL acquisition (via Sun's acquisition) by Oracle.

Although MariaDB is supposed to be compatible with MySQL, for one reason or the other there are quite a few compatibility issues and different features:

  • MariaDB includes all popular open source engines, no InnoDB though, XtraDB acts as a drop-in replacement,
  • MariaDB claims several speed improvements over MySQL, and
  • there are a few new floss extensions that MySQL lacks

MariaDB claims to be SQL99 complete, as does MySQL, so there shouldn't be any differences in queries. Finally, the name comes from Monty's daughter Maria (the other one being My), as MySQL is now a registered trademark of Oracle Corporation.

share|improve this answer
Thank you for the very comprehensive explanation. Exactly what i was looking for. – chrisjlee Nov 17 '11 at 21:43

It's a fork - two separate projects starting from the same original codebase but moving in separate directions. This has happened quite frequently with the open source projects where Oracle has bought the sponsoring companies.

To my understanding MariaDB is maintained and enhanced by the original MySQL developers, and MySQL is maintained and enhanced by Oracle. It depends on who you want to do that job.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.