An in-depth comparison of MariaDB vs. MySQL based on license model, popularity, features, performance, and support.
MySQL and MariaDB are relational database management systems (RDBMS) best known for their mutual compatibility and identical command and query syntaxes.
MariaDB is a free and open-source fork of MySQL that inherited many of that database’s characteristics.
The MariaDB and MySQL database management systems, have a lot in common, making it difficult to choose when you need to decide on a database solution.
But before we get into an in-depth analysis of MySQL vs. MariaDB, let’s start at the beginning.
Brief History of MySQL and MariaDB
Michael “Monty” Widenius is the principal author of the original version of MySQL. The name MySQL comes from Monty’s first daughter My.
Related: How to Run MySQL in Docker Container: A Simple, Easy to Follow Guide
The MySQL database was started by a Swedish company MySQL AB in 1995. Sun Microsystems later acquired MySQL AB in 2008 for $1 billion. Not long after that, Sun Microsystems was acquired by Oracle in 2010. Since then, MySQL has been maintained and managed by Oracle.
When Oracle acquired MySQL, many people on the team worried about the future of MySQL. The principal author of MySQL didn’t like the idea of Oracle becoming the owner of MySQL.
As a result, MariaDB, a community-developed fork of the MySQL database source code, was created. The original MySQL developers start focusing on MariaDB.
MariaDB continues Monty’s tradition by being named after his second daughter, Maria.
According to Monty’s own words, at a MySQL & MariaDB conference in Santa Clara in April 2014, MariaDB was born to ensure that a free version of MySQL always exists.
Now that we have provided the necessary background information, we can get into the topic of this post: MySQL vs. MariaDB.
MariaDB is fully available under the GPL (General Public License) version 2, its full features. However, there is no commercial license, and there will never be for legal reasons.
The GPLv2 states that you can use the software free, but you cannot modify and sell it unless you release the source code.
MySQL was initially under the GPL but had different licensing issues since Oracle bought it. As a result, MySQL keeps a dual-license approach.
So, the MySQL Community Edition is licensed under GPLv2, but the premium features are available only in the MySQL Enterprise Edition, licensed under a proprietary, paid license.
In other words, the main difference between the two licenses for MySQL is the available features and support.
In conclusion, while you receive the full-featured package when using MariaDB, that’s not the case with MySQL. Therefore if we compare the two here, MariaDB has a clear advantage provided by the GPL license it is released upon.
One of MySQL’s most significant advantages is its long market presence. In addition, because it is one of the oldest popular database solutions, developers and database administrators can use a wide range of community resources to find answers to problem questions and fix bugs.
When writing this article, MySQL is ranked #2 while MariaDB is far behind in position #12.
Here you can find the DB-Engines ranking of the database management systems according to their popularity.
So, as can be seen from the chart above, MySQL is the clear winner in popularity.
MySQL vs MariaDB: Features
MySQL and MariaDB have very comparable general options, so they are so similar. However, MariaDB has several additions that improve on MySQL.
Related: MySQL: How to Backup (Dump) and Restore Database Using mysqldump
In addition to the standard Archive, Blackhole, CSV, Federated, InnoDB, Memory, Merge, and MyISAM storage engines, MariaDB contains 12 new engine stores that do not exist in MySQL.
- MariaDB ColumnStore
MariaDB supports more storage engines than MySQL. However, remember that it is not a matter of which database supports more storage engines but rather which database supports the right storage engine for your requirements.
Replication is a process that enables database administrators to copy records from one database to another. MySQL offers asynchronous replication, which means it is a one-way process.
On the other hand, MariaDB allows Master to Slave data transfer and enables Master to Master replication. This provides administrators with added functionality to work with multiple Master databases at once.
MySQL uses a specialized clustering technology called MySQL Cluster. MySQL Cluster is a separate product from the MySQL Community/Enterprise Editions. It provides another storage engine to MySQL, distributing records over multiple hosts by a key hash.
On the other hand, MariaDB uses the Galera Cluster to perform advanced replication for multi-master nodes. It is built by default in MariaDB and can be easily enabled by activating the configuration parameters.
So, in terms of the features, MariaDB offers the same features as MySQL and much more.
MySQL vs. MariaDB: Performance
MariaDB has several optimizations that tend to improve the performance compared to MySQL.
Therefore, the most significant feature and the biggest advantage of MariaDB is its speed and performance. When performing queries or replication, MariaDB is faster than MySQL. In addition, MariaDB also outperforms MySQL when it comes to replication.
MariaDB supports thread pools, improving concurrent connection and execution, especially for simple but CPU-intensive queries in online transaction processing. In addition, MariaDB’s advanced connection pool can run faster and support more than 200,000 connections.
Now, MySQL does have the ability to thread pool. However, it is only available in the Enterprise Edition. This means that the free-to-use community version does not include thread pooling.
It is also important to note that with the Memory storage engine of MariaDB, an INSERT statement can be completed above 20% faster than in MySQL.
MariaDB introduces significant optimizations regarding database views by querying only the necessary tables. In contrast, when you query a view in MySQL, all of the tables that are connected to the view are queried.
So if you need a high-performance relational database solution, MariaDB is a better choice.
MySQL offers an enterprise version of its product that includes complimentary security features and 24/7 support. Backed by the Oracle Corporation, MySQL is an excellent option for business customers looking for steady improvements, consistent updates, and enterprise-level support.
MariaDB also provides a top-quality support option that offers 24/7 technical support throughout the year. In addition, their engineers are experts in both MariaDB and MySQL, which helps a lot if you decide to switch between the two databases.
This brings us to the end of this article, highlighting some of the core differences between MySQL and MariaDB database systems.
Oracle’s MySQL is a well-respected database management system that has enjoyed enormous popularity. MariaDB has many of the capabilities that MySQL has, but it attempts to go a step further by adding various features that MySQL does not have.
Our conclusion is if you need high performance and a variety of connectors from your database solution, then MariaDB is the solution you should prefer. It can offer better performance with more updates and an open-source feature.
Many leading IT companies such as Google, Wikipedia, Wikimedia, RedHat, Ubuntu, Mozilla, SUSE, and many others have opted for MariaDB is undoubtedly a clear indication.
Related: The 5 Best Free Replacements for MySQL Server
If you are interested, here you can find the complete list of differences between MySQL and MariaDB.
If you want to add your thoughts to this MySQL vs. MariaDB comparison, please write down your suggestions below in the comments section.
What about MySQL Heatwave?