Linux experts Seravo background Linux Debian SUSE
Seravo blog: Linux and open source – technology and strategy

10 reasons to migrate to MariaDB (if still using MySQL)

The original MySQL was created by a Finnish/Swedish company, MySQL AB, founded by David Axmark, Allan Larsson and Michael “Monty” Widenius. The first version of MySQL appeared in 1995. It was initially created for personal usage but in a few years evolved into a enterprise grade database and it became the worlds most popular open source relational database software – and it still is. In January 2008, Sun Microsystems bought MySQL for $1 billion. Soon after, Oracle acquired all of Sun Microsystems after getting approval from the European Commission in late 2009, which initially stopped the transaction due to concerns that such a merger would harm the database markets as MySQL was the main competitor of Oracle’s database product.

MariaDB logoOut of distrust in Oracle stewardship of MySQL, the original developers of MySQL forked it and created MariaDB in 2009. As time passed, MariaDB replaced MySQL in many places and everybody reading this article should consider it too.

At Seravo, we migrated all of our own databases from MySQL to MariaDB in late 2013 and during 2014 we also migrated our customer’s systems to use MariaDB.

We recommend everybody still using MySQL in 2015 to migrate to MariaDB for the following reasons:

1) MariaDB development is more open and vibrant

Unlike many other open source projects Oracle inherited from the Sun acquisition, Oracle does indeed still develop MySQL and to our knowledge they have even hired new competent developers after most of the original developers resigned. The next major release MySQL 5.7 will have significant improvement over MySQL 5.6. However, the commit log of 5.7 shows that all contributors are @oracle.com. Most commit messages reference issue numbers that are only in an internal tracker at Oracle and thus not open for public discussion. There are no new commits in the latest 3 months because Oracle seems to update the public code repository only in big batches post-release. This does not strike as a development effort that would benefit from the public feedback loop and the Linus law of “given enough eyes all bugs are shallow”.

MariaDB on the other hand is developed fully in the open: all development decisions can be reviewed and debated on a public mailing list of in the public bug tracker. Contributing to MariaDB with patches is easy and patch flow is transparent in the fully public and up-to-date code repository. The Github statistics for MySQL 5.7 show 24 contributors while the equivalent figure for MariaDB 10.1 is 44 contributors. But it is not just a question of code contributors – in our experience MariaDB seems more active also in documentation efforts, distribution packaging and other related things that are needed in day-to-day database administration.

Because of the big momentum MySQL has had, there is still a lot of community around it but there is a clear trend that most new activities in the open source world revolve around MariaDB.

As Linux distributions play a major role in software delivery, testing and quality assurance, the fact that the both RHEL 7 and SLES 12 ship with MariaDB instead of MySQL increases the likelihood that MariaDB is going to be better maintained both upstream and downstream in years to come.

2) Quicker and more transparent security releases

Oracle only has a policy to make security releases (and related announcements) every three months for all of their products. MySQL however has a new release every two months. Sometimes this leads situations where security upgrades and security information are not synced. Also the MySQL release notes do not list all the CVE identifiers the releases fix. Many have complained that the actual security announcements are very vague and do not identify the actual issues or the commits that fixed them, which makes it impossible to do backporting and patch management for those administrators that cannot always simply upgrade to the latest Oracle MySQL release.

MariaDB however follows good industry standards by releasing security announcements and upgrades at the same time and handling the pre-secrecy and post-transparency in a proper way. MariaDB release notes also list the CVE identifiers pedantically and they even seem to update the release notes afterwards if new CVE identifiers are created about issues that MariaDB has already released fixes for.

3) More cutting edge features

MySQL 5.7 is looking promising and it has some cool new features like GIS support. However, MariaDB has had much more new features in recent years and they are released earlier, and in most cases those features seem to go through a more extensive review before release. Therefore we at Seravo trust MariaDB to deliver us the best features and least bugs.

For example GIS features were introduced already in the 5.3 series of MariaDB, which makes storing coordinates and querying location data easy. Dynamic column support (MariaDB only) is interesting because it allows for NoSQL type functionality, and thus one single database interface can provide both SQL and “not only SQL” for diverse software project needs.

4) More storage engines

MariaDB in particular excels as the amount of storage engines and other plugins it ships with: Connect and Cassandra storage engines for NoSQL backends or rolling migrations from legacy databases, Spider for sharding, TokuDB with fractal indexes etc. These plugins are available for MySQL as well via 3rd parties, but in MariaDB they are part of the official release, which guarantees that the plugins are well integrated and easy to use.

5) Better performance

MariaDB claims it has a much improved query optimizer and many other performance related improvements. Certain benchmarks show that MariaDB is radically faster than MySQL. Benchmarks don’t however always directly translate to real life situations. For example when we at Seravo migrated from MySQL to MariaDB, we saw moderate 3-5 % performance improvements in our real-life scenarios. Still, when it all adds up, 5% is relevant in particular for web server backends, where every millisecond counts. Faster is always better, even if it is just a bit faster.

6) Galera active-active master clustering

Galera is a new kind of clustering engine which, unlike traditional MySQL master-slave replication, provides master-master replication and thus enables a new kind of scalability architecture for MySQL/MariaDB. Despite that Galera development already started in 2007, it has never been a part of the official Oracle MySQL version while both Percona and MariaDB flavors have shipped a Galera based cluster version for years.

Galera support will be even better in MariaDB 10.1, as it will be included in the main version (and not anymore in a separate cluster version) and enabling Galera clustering is just a matter of activating the correct configuration parameters in any MariaDB server installation.

7) Oracle stewardship is uncertain

Many people have expressed distrust in Oracle’s true motivations and interest in keeping MySQL alive. As explained in point 1, Oracle wasn’t initially allowed to acquire Sun Microsystems, which owned MySQL, due to the EU competition legislation. MySQL was the biggest competitor to Oracle’s original database. The European Commission however approved the deal after Oracle published an official promise to keep MySQL alive and competitive. That document included an expiry date, December 14th 2014, which has now passed. One can only guess what the Oracle upper management has in mind for the future of MySQL.

Some may argue that in recent years, Oracle has already weakened MySQL in subtle ways. Maybe, but in Oracle’s defense, it should be noted that MySQL activities have been much more successful than for example OpenOffice or Hudson, which both very quickly forked into LibreOffice and Jenkins with such a momentum, that the original projects dried up in less than a year.

However, given the choice between Oracle and a true open source project, the decision should not be hard for anybody who understands the value of software freedom and the evolutive benefits that stem from global collaborative development.

8) MariaDB has leapt in popularity

In 2013 there was news about Wikipedia migrating it’s enormous wiki system from MySQL to MariaDB and about Google using MariaDB in their internal systems instead of MySQL. One of the MariaDB Foundation sponsors is Automattic, the company behind WordPress.com. Other notable examples are booking.com and Craigslist. Fedora and OpenSUSE have had MariaDB as the default SQL database option for years. With the releases of Red Hat Enterprise Linux 7 and SUSE Enterprise Linux 12 both these vendors ship MariaDB instead of MySQL and promises to support their MariaDB versions for the lifetime of the major distribution releases, that is up to 13 years.

The last big distribution to get MariaDB was Debian (and based on it, Ubuntu). The “intent to package” bug in Debian was already filed in 2010 but it wasn’t until December 2013 that the bug finally got closed. This was thanks to Seravo staff who took care of packaging MariaDB 5.5 for Debian, from where it also got into Ubuntu 14.04. Later we have also packaged MariaDB 10.0, which will be included in the next Debian and Ubuntu releases in the first half of 2015.

9) Compatible and easy to migrate

MariaDB 5.5 is a complete drop-in-replacement for MySQL 5.5. Migrating to MariaDB is as easy as running apt-get install mariadb-server or the equivalent command on your chosen Linux flavor (which, in 2015, is likely to include MariaDB in the official repositories).

Despite the migration being easy, we still recommend that database admins undertake their own testing and always back up their databases, just to be safe.

10) Migration might become difficult after 2015

In versions MariaDB 10.0 and MySQL 5.6 the forks have already started to diverge somewhat but most likely users can still just upgrade from 5.6 to 10.0 without problems. The compatibility between 5.7 and 10.1 in the future is unknown, so the ideal time to migrate is now while it is still hassle-free. If binary incompatibilities arise in the future, database admins can always still migrate their data by dumping it and importing it in the new database.

With the above in mind, MariaDB is clearly our preferred option.

One of our customers once expressed their interest in migrating from MySQL to MariaDB and wanted us to confirm whether MariaDB is bug-free. Tragically we had to disappoint them with a negative answer. However we did assure them that the most important things are done correctly in MariaDB making it certainly worth migrating to.

59 thoughts on “10 reasons to migrate to MariaDB (if still using MySQL)

  1. Joe Fletcher says:

    Thanks! I just ran `sudo apt-get install mariadb-server` on a relatively new server running one new WordPress install and didn’t miss a beat during the install!

  2. Ethan says:

    “One of our customers once expressed their interest in migrating from MySQL to MariaDB and wanted us to confirm whether MariaDB is bug-free.”

    No software is “bug-free.”

    1. Otto Kekäläinen says:

      @Ethan: This was a quote from our customer. I hope you get the joke..

    2. jdk says:

      I heard once that the only code that is bug free is the one that is never used or does nothing

    3. Max Watson says:

      Well, I made a software that echo “Hello World”, and I didn’t found any bugs!

      1. M. Lar says:

        Wait until you upgrade and it says ‘invalid syntax on line 1’

        1. Alejandro says:

          haha :) funny

        2. Claudio says:

          That’s Murphy’s Law in action. Nothing is engineering if bug free.

    4. haris says:

      the only app that “bug free” is “Hello World APP”

      1. Claudio says:

        Even so, if it were written as:

        now it would be buggy.

  3. Tevya says:

    So as a drop-in replacement, there shouldn’t be any issues with WordPress, WP Plugins, etc, right?

    My host offers migration from MySQL 5.5 to MariaDB 5.5 or 10.0. Should I go straight to 10, or go to 5.5 first for compatibility reasons?

  4. Otto Kekäläinen says:

    @Tevya: It should be just fine to upgrade directly to 10.0.

    1. Tevya says:

      Thank you!

  5. Tim says:

    After reading every word of this article i only can conclude that you are a VERY frustrated probably past code backer which is against the real world and only happy with open source, open company, community driven companies who put all their company notes onto the surface to get bashed out in the open. One who cannot live in a world without these ‘standards’. Thats fine, but those are not really reasons for migrating to a product which is new and unknown for us.

    I have read the article with interest and open to finding all those (10) good reasons to migrate, but i have found none. I only found maybe-in-the-future reasons which are all speculative, and reasons like ‘they are releasing one month later than the previous management so the product sucks’. No the product does not suck, the product works perfect. But it is you that cannot accept another way of how things are handled. No offense, but that does not make a product bad or dead.

    I am sorry, i am not going to migrate to Maria DB.

    1. Echizen says:

      I know you’re Oracle evangelist, so don’t ever migrate to other DB :D

      MariaDB developed by the original creator of MySQL, people behind the development of MySQL for over years…no doubt for me there’s no reason to not switch to MariaDB :P

  6. Otto Kekäläinen says:

    @Tim: if you like MySQL better, then go ahead and continue using it, I am sure you have some motivation for that but reading your argumentation you don’t reference anything specific that would be better in Oracle MySQL than in MariaDB.

  7. Mario says:

    Actually Tim with his “negative” comments he brings some truth about the status of MySQL and MariaDB. For most companies, if the code is available or not, or how a software is internally or externally developed is not a decisive factor in terms of whenever is worth using that software. While MariaDB maybe more open, with more OSS developers working for it, still MySQL get the job done, and get improved. If the time when MySQL development and free releases are completely stopped, then people will go for an alternative. But right now is.. Don’t fix what is not broken.

    1. Wadson92 says:

      We know that MySQL gets the job done but you have to understand the open source mentality. Oracle is one of the biggest db company and a direct MySQL competitor. In my understanding, I don’t think that MySQL will improve that much (and if it does it will do the Oracle way) for the simple reason that the developers that made it what it is now resign to work on a brand new project, MariaDB. I think if big companies like Google, Wikipedia, booking.com migrated their db to MariaBD, there is a reason to do to.

    2. Chris says:

      Don’t fix what isn’t broken?

      How about features that simply don’t work properly in MySQL and might never work: subqueries, server-side prepared statements, etc. These and many other issues have been fixed in MariaDB.

      So I guess the choice is yours: stick with the product whose failings you have become comfortable with, or switch to a product that doesn’t have those failings.

      Oracle has no reason to significantly improve MySQL: they would rather sell Oracle DB licenses instead. MariaDB wants to build a great product, so they are doing it.

      I predict that 10 years from now, MySQL will be the database that most people just install on Windows desktops because they have heard of it. Everyone else will have moved to MariaDB and will be happier for it.

  8. Sudha says:

    Can anyone please let me know the steps to migrate a database which is on MySQL 5.6 to Mariadb 10.0? Also the users related to db- do I need to migrate them separately?

    1. Otto Kekäläinen says:

      @Sudha: just backup your old database and then run ‘apt-get install mariadb-server’ or an equivalent command on your chosen distribution. We have not yet bumped into situations where migration from 5.6->10.0 would not be possible automatically, but theoretically the projects have started to diverge, so somebody might bump into problems.

      Another even safer way would be to run mysqldump to get a dump of your data, including mysql database and users table. Then purge MySQL away and install MariaDB, and import the dump file into MariaDB and you should end up with new server that has all the old data.

  9. Sudha says:

    on Linux platform- missed to mention this earlier

  10. Coenraad says:

    I think you missed the most important reason: MySQL was started and written by Michael “Monty” Widenius. He was basically booted from his own project by corporate bullies, and couldn’t continue using the name MySQL (Which is named after his daughter.) Hence, he continued the project under a new name. Named after his other daughter. It was always, and still is, his brainchild, arguably MariaDB is more MySQL, than MySQL is.

  11. hooli says:

    As soon as MariaDB becomes bigger than MySQL, Oracle will buy it. Another carrot on a stick to make some other developers get their Oracle payout.

    1. Coenraad says:

      I think he has learned his lesson and won’t do it again.

  12. Tom says:

    CentOS 7 installs MariaDB rather than MySQL by default, however you can install repos to change this.

    I for one choose not to use MariaDB for the simple fact that I’ve never been able to get AUTO_INCREMENT_INCREMENT to work with it, whilst MySQL is fine

  13. J.s. says:

    The most important value of mariadb is its lgpl licenced c and java connectors

  14. Muhammad says:

    Most important part of story. When you live in Iran Oracle ban you for download the mysql or other products. MariaDB is community base and no one can to ban you. So MariaDB is my favorite and i feel freedom when use it.

  15. Ali says:

    No one commented on Record Locking and FullText searches ??
    Are they the same for Mysql and Mariadb or is one better than the other?

  16. Ken says:

    One thing I liked about MySQL was the GUI utilities that were available for it. I haven’t seen anything similar for Mariadb (yet?).

    I did install the MySQL Workbench, and, although it had some basic functionality, it still lacked a lot of useful stuff.

    I did move over to Mariadb, but still wish it had a good GUI tool built for it.

    1. Chris says:

      MariaDB is a plug-in replacement for MySQL. Can the GUI tools even tell the difference? Seems like they should be able to talk to either back end…?

      1. Otto Kekäläinen says:

        In most cases the GUI can’t tell the difference and MariaDB is a drop-in-replacement for MySQL.

  17. Sam says:

    Can anyone please let me know the steps to upgrade from MySQL 5.5 to Mariadb 10.0 in WHM ,do i just need to follow those 7 steps shown in WHM ,tick infront of all warning in each step & choose “Unattended Upgrade” as the option to keep my old settings ? [never done it before] [have backed up the database of my websites]
    Thanks

    1. Otto Kekäläinen says:

      What does WHM stand for? MariaDB 10.0 is quite well backwards compatible with MySQL 5.5. What distribution do you use? You should be able to run just ‘apt-get install mariadb-server’ or ‘yum install mariadb-server’. Just to be safe, back up your old database first with mysqldump.

      1. Sam says:

        Hi Otto
        Thanks for fast reply.
        By WHM i meant – Web Host Manager for cPanel (WHM) .
        I have backed up the databases of the websites running on the server.

        There is actually a feature inside WHM for upgrading from Msql 5.5 to Mariadb 10 . see this ss – http://prntscr.com/9g1wf9

        The process seems to be straightforward , but I have never done this upgrading process before so wanted advise on it [regarding the what-to-do steps in my above reply] if i need to take any more precautions , if after upgrading it damages cpanel/WHM components [sorry i m newbie & starting to learn all these stuffs :) ]

        PS – i am a newbie in using putty commands so was thinking of upgrading through the WHM feature .

        Thanks

  18. Dave says:

    To the nay-sayers I have the following:
    – Don’t think that insisting on open-source is just some hippy coderism – the visibility of open source means no secret bugs that Oracle knows about but won’t be bothered patching until the next quarterly cycle;
    – If MariaDB is acquired down the track it won’t necessarily counter the preceding arguments: the problem with Oracle owning MySQL is that the new owner is deeply conflicted not that they are a big company;
    – Oracle has demonstrated repeatedly that they have no interest in maintaining Sun’s portfolio of developer-focused tools and services – just look at Glassfish, a product to which I devoted months of development only to have Oracle kill it so we would all “upgrade” to WebLogic. If Glassfish is any indicator MySQL is doomed. Serious bugs filed 2 years ago still unfixed despite patches being submitted and no way to get your code accepted upstream. These are very good reasons to migrate away from MySQL. Oracles actions (or lack of) on this front speak much more loudly than their promises.

    1. Camron Lent says:

      This comment is by far the best one I have read. It accurately explains, with an obvious example, why Oracle should not be trusted to manage MySQL. My reality is that if MySQL becomes a problem I will need to switch, if MariaDB becomes a problem I will need to switch.

      Switching now to means that down the road I may, or may not, need to switch. However Oracle’s track record suggests that not switching almost guarantees that I will have to switch later. I’d rather have the possibility of not having to deal with political bugs than the almost certainty of dealing with them.

  19. Junaid says:

    Good article explaining why we should not use MySQL, and particularly start to use MariaDB.
    I already started migrating my projects from MySQL to MariaDB.

  20. Alexis says:

    I just change to MariaDB. The best choice. Thank you for the Explanation :)

  21. Hosting Fever says:

    Sounds interesting but can’t take risk on my cpanel server with client’s sites. Will try on local system first. Thanks

  22. Jimbo99 says:

    MySQL vs MariaDB. I just see this as the Open Office vs Libre Office game that Open Source & Oracle are playing with each other. Oracle really has 3 DB products now, Oracle, My SQL and since MariaDB is based off MySQL, it might as well be Oracle’s 3rd database. I mean Oracle’s MySQL release determines the next MariaDB and stable MariaDB lags. 2017, SQL Server moves to Linux. That’s going to have an audience/target market of IT migration because it most likely will be virtually 99.99999% compatible with Windows versions ?

    1. Dave says:

      Except MariaDB was forked years ago and is not coupled to MySQL’s release process in any way. Oracle has nothing at all to do with it. Nice-to-haves from MySQL are ported – the same is not true for fixes and new features rooted in MariaDB. Look at Java and Glassfish – that’s what you have to look forward to in MySQL from Oracle.
      As far as MSSQL is concerned … I have spent a significant portion of the last decade moving fed-up customers off it onto more stable, faster and less encumbered alternatives. Don’t expect a rush to MSSQL on Linux. Too little too late from Microsoft there.

  23. FMR says:

    1. Really useful article! Could you just update it to current status?
    2. Any news about MariaDB 10.1 on Debian (Sid)?
    Thanks!

    1. Otto Kekäläinen says:

      1) We don’t plan to update old blog posts. Please do subscribe to our updates so you can see if/when we write a 2016 or 2017 edition of this post.

      2) For Debian questions, please post them to the Debian pkg-mysql-main mailing list where Debian MySQL and MariaDB packagers might discuss release plans.

      1. FMR says:

        Thanks for the reply!
        Asked here about MariaDB 10.1 in Debian:
        http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/2016-May/thread.html#8997

  24. NGABO ADRIAN says:

    In mysql we easily use workbench to create dumps. Which tool do you have in Mariadb? Be aware that console interface and using command line stuff is hard for non programmers. I will wait till you make such a simple tool. If you’ve not managed to create one, the Mariadb is still young and Mysql is far ahead of you.

Leave a Reply

Your email address will not be published.