MariaDB vs. MySQL

MariaDB vs. MySQL: Which is better for WordPress and are there differences?

You should have heard of MySQL before. It is a database system that is used in almost all WordPress installations. But does the name MariaDB also mean something to you? If not, then this article is made for you and you should read it carefully.

Why? Because WordPress can now be handled very individually. Just as Apache, LiteSpeed or Nginx can be used as server software, there are also different variations of database systems. Among others, there is MariaDB. Today I’ll explain what it’s all about and if it’s worth to use WordPress with MariaDB.

What exactly is MariaDB?

MariaDB website screenshot: MariaDB Server: The open source relational database
MariaDB website screenshot: MariaDB Server: The open source relational database

When MySQL was released as an open source database management system in the 90s, it was a huge success. So big, in fact, that the sale in 2008 to Sun Microsystems is said to have brought in one billion US dollars. Not bad, because even if the sum is considered unconfirmed, it was a classic exit.

MariaDB is a binary compatible 1:1 replacement for MySQL

mariadb.com

One of the founders and the core team of MySQL then left the company and founded a MySQL fork called MariaDB in 2009. The reason for this was that Sun was going to be acquired by Oracle, a controversial company in the open source community. So the team split off to pursue their own visions in the further development of MySQL. MariaDB was born.

By the way, the developer Michael Widenius is mainly responsible for MySQL and MariaDB.

Fun fact: MariaDB was borrowed from the first name of Michael “Monty” Widenius ‘ youngest daughter. The “My” from MySQL comes from the first name of his eldest daughter and in MaxDB you can find the name of his son.

In short, MariaDB was meant to ensure that there would always be a freely available version of MySQL, no matter what Oracle planned to do with it. Everything as open as possible and with public respositories, documentation of all steps and a fork of the MariaDB Foundation and the MariaDB Corporation. The former for everything open source, the latter for everything commercial. In this way, there should never be a conflict of interest between open source and commercial from the beginning, unlike Oracle.

Differences between MariaDB and MySQL

MariaDBMySQL
Storage EnginesMariaDB has 12 new storage engines that you won’t find in MySQL.Compared to MariaDB, it offers fewer options for storage.
Speed improvementsMariaDB has higher speed compared to MySQL.MySQL has slower speed compared to MariaDB.
Initial release20091995
Operating systemsFreeBSDLinuxmacOSSolarisWindowsFreeBSDLinuxOS


XSolarisWindows


Cache and IndexesWith MariaDB’s memory storage engine, an INSERT statement can complete 24% faster than in standard MySQL.MySQL’s memory engine is slower compared to MariaDB.
Features & ExtensionsMariaDB has new features and extensions, including the JSON, WITH, and KILL statements.The new MariaDB features are not included in MySQL.
MonitoringSQLyogMySQL Workbench
RoutingMariaDB MaxScaleMysql Router
Github Stars2.8004.000
Github Forks8681.600
Table

MariaDB is a database management system just like MySQL and it is based on the same foundation. Not only did some of the original developers create the fork, it’s also a fork, so it’s a clear fork. However, that has since changed, as MariaDB has continued very much on its own over all this time.

Until version 7, MariaDB was designed to be fully compatible. Whether from MySQL to MariaDB or vice versa, users should be able to switch easily and quickly without having to fear problems. This has changed somewhat since version 8, as MySQL and MariaDB have moved in different directions. However, most core aspects are still compatible.

MariaDB, unlike MySQL, focuses on flexibility, including the engines used. A database engine is a storage subsystem that is used for writing, reading, deleting and so on. MariaDB allows here from InnoDB, over Spider or MyISAM almost all popular engines. If you are more interested in the potential differences, it is best to take a look here.

So purely in terms of handling, MariaDB and MySQL do not differ from each other, since both fully support the database language SQL. The biggest difference is rather to be found in the performance. MariaDB should basically act faster, has a clever optimizer for SQL queries and has a higher performance. This is supposed to work wonders for WordPress in particular. However, this point is difficult to compare. Among other things, because every database acts differently, the engine is crucial and it therefore seems difficult to measure pure performance in comparison with another system.

MariaDB vs MySQL

MariaDB vs MySQL on Google Trends
MariaDB vs MySQL on Google Trends

As you can see on the graph, MySQL is still searched for much more often than MariaDB. I think this is mainly because MySQL is simply also used as a synonym for the fork. But many simply don’t know the difference. On top of that, many a hoster actually uses MariaDB, but still specifies MySQL in the package description.

You might also be interested in: Search and replace in MySQL

MariaDB and phpMyAdmin

phpMyAdmin shows the tables of the SQL database
phpMyAdmin shows the tables of the SQL database

If you use MySQL, you surely know phpMyAdmin, a very handy graphical interface for the database. The tool requires a web server, PHP and a browser.

But does phpMyAdmin also work for MariaDB?

Yes, you can use the web-based database administration tool for MariaDB as well.

MariaDB vs MySQL FAQ

Yes. In general MariaDB is significantly faster compared to MySQL. In particular, MariaDB offers better performance when it comes to views and handling flash storage through its RocksDB engine. MariaDB is also faster than MySQL when it comes to replication.

Plus, MariaDB is open source!

MariaDB does not have a graphical user interface, but there are a variety of external tools available. Among them are phpMyAdmin, Webyog/SQLyog, HeidiSQL, and MySQL Workbench.

Conclusion about WordPress with MariaDB

In the end, it’s almost a matter of faith which is better or worse. In combination with WordPress, MariaDB works very well and extremely performant. Whether faster or not, everyone should test for themselves and decide which system they prefer. If all this means nothing to you, you should leave it alone anyway.

You should also keep in mind that MySQL is more or less a commercial product of Oracle. If you are fully committed to open source and want to support it, you are better off with MariaDB. This is also due to the fact that here is often more courageous or simply more agile optimization than is the case with MySQL.

For WordPress, MariaDB is mainly advantageous because of the performance and thus with regard to the database engines. But just as few people experience a performance boost when switching PHP versions (because it is only very marginal), switching from MySQL to MariaDB won’t turn your lame WordPress blog into a raging one. So it’s more about using the more “open” system.

Those who know their stuff will appreciate that. For all “normal” users, on the other hand, switching WordPress from MySQL to MariaDB makes almost no sense. For large companies, on the other hand, it is also about money, because MySQL has been commercialized much more by Oracle. Nevertheless, in the end it is more a question of faith than a question of technical nature.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

2 Comments

  1. It looks good, so I installed MariaDB. But I already had MySQL running a WordPress instance. The MariaDB installation warned me it was going to change the — port? Not sure — for accessing MySQL to avoid a conflict. There was no way to back out; I hit ‘Esc’ instead of pressing ‘OK’, but the change happened anyway. There was a note about using ‘mysqldump’ or, presumably, some other tool to export the MySQL data. But I don’t know how to find it to do that. I do have the tool ‘WP-CLI’ installed on my system. Do you have a quick remark on how I can proceed with least pain?

    I am root; it’s a Ubuntu 20.04 cloud server.

    spamless@rubicon:~$ uname -a
    Linux rubicon 5.15.0-1011-oracle #15-Ubuntu SMP Fri Jun 10 12:21:49 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux