Blog

08
December 2013

Gavin Pickin

Maria DB - Whats all this noise about Maria DB Replacing MySql

MariaDB

I have threatened to talk about my recent experiences with MariaDB, so this is the start of another small series on my blog, where we'll look at what is MariaDB, why should I consider using MariaDB, how to get Coldfusion / Railo talking with MariaDB, using the MySql Driver, and the MariaDB Driver, what possible compatibility issues might I run into, and is it production ready?

So, lets start with What is MariaDB?

According to the website, MariaDB is a "drop-in" replacement for MySql. That is a pretty big selling point... and we'll see how true it is... as we go through the next few posts in this series. So where did MariaDB start? Michael 'Monty' Widenius (one of the biggest contributors to Mysql and MariaDB since 1981) leaves Sun Microsystems in 2009, a year after Sun acquired MYSQL AB for a BILLION Dollars, to fork Mysql and begin working on MariaDB. A growing list of projects seem to fork and grow when when Sun / Oracle has taken them over, one of the biggest ones I know of apart from MySql / MariaDB was Hudsen, which is now Jenkins.

Michael 'Monty' Widenus
Monty has worked on the MySQL/MariaDB codebase since 1981. At least 60% of the MySQL code is still his. He is a MySQL Fellow and is the founder and CEO of Monty Program Ab and the creator of MariaDB.
Taken from https://mariadb.com/about

Since MariaDB was born, its has had a lot of support, with a MariaDB Foundation being created, and over 20 million dollars in Capital pumped into a new merged company. Google has shown public support of the MariaDB Project, supporting Open Source Projects, Google has said to have assigned a dedicated engineer to the MariaDB project, and many others have helped really fine tune and optimize MariaDB. This support has helped give MariaDB the performance gains needed to make it a powerful solution, and Google has stated that it intends to migrate hundreds of thousands of databases from MySql to MariaDB. 

Is MariaDB really a drop in replacement for MySql? Yes it is, meaning you can uninstall MySql and install MariaDB, without having to convert data files, it should just work. BUT, yup, you knew it was coming, it doesn't mean that every feature, and every SQL query you have, will run as expected, or without error. Of course, it depends entirely on what you are doing with MySql, what version you are running, and the drivers you are using. For more information on the compatibilities, you can read them on this page from the MariaDB.org website - MariaDB versus MySql Compatibility

One of the very cool features of MariaDB, since it is forked, they periodically merge MySql changes and bug fixes back into MariaDB... so as MySql advances, MariaDB continues to benefit from those open source improvements, while they continue to follow their own path. 

So, everyone up and left Sun (who later was bought by Oracle) to start MariaDB, what were they going to do to make it so different, and have they achieved it? One of the things they did was build on the several included Engines, and add a slew of new engines. There are 10 engines listed on their MariaDB Features page (https://mariadb.com/kb/en/mariadb-versus-mysql-features/) including the mention that they are trying to add some NoSql engines as well. With the hype NoSql has been getting for a while, the ability to integrate those into your existing DB Server might be an interesting option, especially for those looking to experiment. Obviously, they tout a lot of speed improvements, and they intend to add any and every "useful safe and stable" feature, while Eliminating as many bugs as possible, making Better Testing, and all of this, while staying true to Open Source, which Oracle has not been 100% supportive, according to the MariaDB.org site. 
Read more about all of this here https://mariadb.com/kb/en/mariadb-versus-mysql-features/

Some notes to be aware of with this Drop In replacement. Since MySql and MariaDB share some libraries, and configuration files, it is said they do not run on the same machine... and when you remove one, to install the other, configuration files can be renamed, so not all your configuration will port. You can rename the files and restore your settings, you just have to be aware that although the process sounds simple, they might be some complications. When we switched one machine from MariaDB back to MySql, we were getting a lot of strange items in our logs... mainly from settings that MariaDB had that Mysql did not... so although it is supposed to be drop in, make sure you make backups, and read the documentation when installing and uninstalling, to reduce the number of headaches you might come across.

Ok, I think that about covers the basics, introductions to who, what, where, why, when and even how... so I think that is enough for today... next post in this series will be a little more hands on, and we'll look at installation, and using the MySql Driver vs the MariaDB driver, and how to use them both, in ColdFusion and Railo.

Thanks for reading, have a good one.
See you soon

Gavin

Blog Search