MariaDB and MySQL are both popular open source relational database management systems (RDBMS). While they share a common lineage and have many similarities, they are not exactly the same thing. Here's a brief overview of their relationship and differences:
Background
- MySQL: Originally created by a Swedish company called MySQL AB in the 1990s, MySQL became the go-to open-source relational database for many applications, especially those running on the LAMP (Linux, Apache, MySQL, PHP) stack. In 2008, Sun Microsystems acquired MySQL AB, and in 2010, Oracle Corporation acquired Sun, making Oracle the owner of MySQL.
- MariaDB: MariaDB was created by the original developers of MySQL after Oracle's acquisition of Sun Microsystems. Led by Michael "Monty" Widenius, the founder of MySQL, the MariaDB fork was created in 2009 to ensure that the database would remain free under the GNU GPL. MariaDB is intended to maintain high compatibility with MySQL, being a drop-in replacement in most cases.
Compatibility
- Binary Compatibility: Initially, MariaDB was highly compatible with MySQL, meaning that data and table definition files (*.frm files) and client APIs were interchangeable. However, as both projects have evolved, this can no longer be guaranteed for their latest versions.
- Command Compatibility: MariaDB strives to keep its SQL and command-line tool syntax as close to MySQL as possible to ensure ease of transition for users.
Differences
MariaDB and MySQL have started to diverge in several key areas:
- Storage Engines: MariaDB has introduced new storage engines that are not available in MySQL, and it also offers optimizations and features that are not present in MySQL, such as the Aria storage engine.
- Performance Enhancements: MariaDB often includes performance enhancements and new features that MySQL does not have, partly due to MariaDB's more open and rapid development process.
- Features: MariaDB has introduced features like the Galera Cluster for synchronous multi-master replication, which MySQL does not natively support in the same way.
- Licensing and Governance: MySQL is owned by Oracle and is available under the GNU GPL for the open-source version, with enterprise features under a commercial license. MariaDB, managed by the MariaDB Foundation, also adopts the GPL license, but its governance model is more open compared to Oracle's stewardship of MySQL.
Conclusion
While MariaDB started as a fork of MySQL and maintains close compatibility with it, they are distinct projects with different features, performance enhancements, and development philosophies. The choice between using MariaDB or MySQL often comes down to specific needs regarding features, performance, and licensing considerations.