DGhost's Blog

A sysadmin thoughts about the Internet and technologies…

Why should I switch to MariaDB?

| 0 comments

Why indeed? That is the question I’ve been wondering myself for the past weeks. I recently had to update some MySQL servers running on Linux, these installations were an old version and I had to bring it up to one of the latest, stable version with PHP for some custom web applications. While doing this operation some weeks ago, I remembered that there was this hot new thing (released in 2009, already) called MariaDB that was created by the original author of MySQL – Michael “Monty” Widenius – who abandoned the ship when MySQL was bought from Oracle (inserting the obligatory Star Wars theme, the Imperial March here). The acquisition from MySQL to Oracle is a little bit more complicated than this resume. So while doing the upgrade, I remembered that I had on my – never ending – to do list, try this thing called MariaDB. Not on a production system, but on a less mission critical server for a starting point to see, what was the big fuzz about this… thing…

Don't you have anything else better to think about?

Don’t you have anything else better to think about?

But before going on to my own personal experience with MariaDB, let’s go back in time to understand why MariaDB was created in the first place. Indulge me because this will help understand why some companies or organizations like Google or Wikipedia have made the switch from MySQL to MariaDB. So back in time; when MySQL was officially sold to Sun Microsystems in 2008, everything was looking bright for the future of MySQL since there was a load of cash being injected in the company that created and maintained the code of this open source project.  And then, a year and half later, the other news dropped on the Internet, Oracle announced that it was buying Sun Microsystems. Michael Widenius then embarked on a crusade for not letting it happen because, well, Oracle is also the owner and creator of one of the most powerful and oldest databases system, Oracle SQL DB – not open source of course. Also Oracle doesn’t have a good reputation for dealing well with open source licenses. Business is business, Oracle officially owned Sun Microsystems in 2010. Oracle gave assurance through some empty press release that the future of MySQL was secured and they would not kill the product and would take care of it. This did nothing to reassure the community of users and developers of MySQL. Oracle then created 2 different licenses of MySQL, one for the open source community and one for the “paying customers/users” of Oracle/MySQL. That really did not help reassure the users of MySQL and it’s original author, because, this proved one thing, Oracle can change the licensing model of MySQL on a whim, if they wanted to. Michael Widenius then left Sun – now owned by Oracle – to start a new project based on a fork of the MySQL code that he named MariaDB, in honor of his new daughter, Maria.

And there you have, I think, the first main reason of why people are switching to MariaDB. It’s a political reason based on the licensing model. The primary reason of switching, is not based on a technological decision but mainly for the licensing option that MariaDB offers compare to what Oracle has done with MySQL. Wikipedia has publicly acknowledge this last year when switching from MySQL to MariaDB. Google also did the migration, but with less fanfare than Wikipedia. The giant of the Internet has already dedicated some resources to the team of MariaDB, meaning that they are serious about the future of this project. The numbers of top web sites that are migrating away from MySQL to MariaDB is growing every month. But what does this all means for me, who work with systems that are dwarfed by the scale in comparison of these giant of the Internet? I’m here to try to answer this simple question for myself and for the systems that I managed if it’s worth it or not.

hamlet_sw_mariadb

Why oh why indeed!

Now, I have to say, I’m a system administrator and a technology consultant, not a developers. I say this because for me when I propose some changes for a system or technologies it’s a big decision. The decision I can take or propose to my customer usually affect a systems that is mission critical or important to a business and, sometimes, are the lifeline of the business. And I’m the one maintaining it and putting my ass on the fire. So I usually don’t try new products with my customers because it’s the latest fad on the Internet. I stick with product/technologies that made the proof for being stable, documented and having a good life expectancy. Developers on the other hand have the easy life – sometimes – to try the latest technologies for development purpose and can try for a new project a totally new platform that never passed the ultimate test itself, time. MariaDB is not really a problem on that side because, like I already said, it’s a fork of the code from MySQL. Meaning that MariaDB is compatible with existing MySQL databases and tables. Seriously, I’m not kidding! The binaries even have the same name! It’s a joke how easy it is to switch from one DB system to another. You may encounter some technical issues while doing so, but nothing major that hasn’t been documented so far. If you are currently a crack at MySQL, well, without knowing it, you are a crack with MariaDB. I did the switch for my current CentOS server with MySQL, PHP and phpMyAdmin running on it. The switch from MySQL to MariaDB took less than 10 minutes. There is a lot of documentation on how to do so on the Internet. I’ve followed this simple guide for CentOS and everything went well. Since I was already running the latest version of phpMyAdmin, I had nothing to do with it to make it work with MariaDB – except the mysql_upgrade command for the database itself. I got an automatic backup by dumping the DB on that server everyday and I didn’t even had to use that backup to start MariaDB, it took by default all the databases under /var/lib/mysql on the first shot. Really, really, really easy to do the switch.

Your Kung Fu is strong with MariaDB. If it is with MySQL...

Your Kung Fu is strong with MariaDB. If it is with MySQL…

What about performance? The website of MariaDB is full of marketing hype about the speed improvements of MariaDB over MySQL. I never intended to do a speed comparison with some expert tools for this post to know exactly how much milliseconds the query took to be done. I can say, after a couple of days of using it, it does seems to be faster, but it could also be my imagination. Take note that the database I’m using for my web application is small. Not even 1 Megs of data in it, so it might not be the best use for trying to compare it with MySQL. What is interesting tough is all the options and features that MariaDB offers by default. Just the list of storage engines is impressive, but since I did a migration away from MySQL, I’m still using InnoDB.

So after all that said and done, do I think I should switch to MariaDB? Yes, but I’m not doing it for the licenses of GPL/LPGL/BSD. Oracle has proven to me, so far, that it can take cares of MySQL in the future. The recent versions that has been released in the last year shows that MySQL will still be there for a long time. Some of you may switch to MariaDB because you might be afraid that Oracle could, at any times, change the licensing of MySQL, to that I say, you may be right, but personally, I don’t believe it. I don’t have, and see, any urgency to migrate right away all the current MySQL databases that I manage to MariaDB. For installing new servers and service, yes I will now choose by default MariaDB over MySQL. But if I have a mission critical application using MySQL, I don’t see why I should recommend to my customers to do a migration right away to MariaDB, the arguments of the licensing and technological improvements are still not strong enough… But I will start using MariaDB for sure in the future, whenever I can, just because of all the features that I have with it.

Author: DGhost

System Administrator and consultant for more than 23 years. I've always used computers since I was a kid. I' ve specialized in networking, servers and the inner workings of the Internet. My blog is aimed as a personnel point of view on some technologies, the web, sciences and the Internet in general. If you are wondering why this website is in French and English, that's because I'm a french Canadian who also speaks English and sometimes, when I'm drunk, dabble in Spanish.

Leave a Reply

Required fields are marked *.



 

This site uses Akismet to reduce spam. Learn how your comment data is processed.