83

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.

95

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, one of the original developers of MySQL and co-founder of MySQL Ab. The MariaDB Foundation acts as the custodian of MariaDB.

The main motivation behind MariaDB was 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,
  • MariaDB claims several speed improvements over MySQL, and
  • there are a few new floss extensions that MySQL lacks

    Finally, the name comes from Monty's daughter Maria (the other one being My), as MySQL is now a registered trademark of Oracle Corporation.

  • 1
    Thank you for the very comprehensive explanation. Exactly what i was looking for. – chrisjlee Nov 17 '11 at 21:43
  • 5
    MariaDB is explicitly not SQL-99 complete, as disclaimed on the very page this answer links to. For example, it doesn't support assertions at all and CTEs haven't yet made it into a stable release. The story is much the same for MySQL. – Air Oct 10 '16 at 19:12
  • I believe the links to montyprogram dot com have rotted, but I have no clue where equivalents for these links could be found online. – Hay Jul 26 '17 at 14:46
  • MariaDB supports InnoDB right? why its written like that? – Paulson Peter Sep 13 '18 at 8:18
  • 1
    @PaulsonPeter Yes, MariaDB supports InnoDB. Not sure what your second question is about. – yannis Sep 13 '18 at 10:36
15

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.

3

Differences I have found so far:

protected by gnat Oct 6 '17 at 11:49

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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