Image Source:

A few weeks ago, I read about MariaDB as a replacement for MySQL.

MariaDB is an alternative choice for a database when professionals are looking for a robust, scalable, and reliable SQL server. It is an opensource drop-in replacement for the MySQL database and behaves in the exactly same way as MySQL. (Source)

I could scarcely believe my eyes  as my world was thrown into turmoil (by life events, not MySQL). Although I don’t use MySQL every day, as I once did, I do like to play around with MySQL-based solutions (e.g. WordPress, Moodle, etc.). Would I have to learn everything again from scratch with mariadb-server?

It seems that the venerable MySQL, which probably handles more data on the world wide web than any other database, is currently going the way of (which was recently removed from most Linux distributions and substituted with LibreOffice) and being replaced by a fork called MariaDB. As was the case with OO.o, the reason is largely the same – the mistrust many open-source developers harness towards Oracle which now controls the development of MySQL. 

The Fedora wiki page explains the reasons behind the potential move: 

The original company behind MySQL, MySQL AB, was bought out by Sun which was then bought by Oracle. Recent changes made by Oracle indicate they are moving the MySQL project to be more closed. They are no longer publishing any useful information about security issues (CVEs), and they are not providing complete regression tests any more, and a very large fraction of the MySQL bug database is now not public. MariaDB, which was founded by some of the original MySQL developers, has a more open-source attitude and an active community. We have found them to be much easier to work with, especially in regards to security matters.” Besides Fedora, Mageia has already replaced MySQL with MariaDB in their most recent release, while openSUSE has also indicated its intention to switch. (Source: DistroWatch)

As I revisit this news in a chance blog entry on DistroWatch, I can’t help but ask myself, Will Moodle work with MariaDB? Some other questions come to mind: How hard will it be to transition a Moodle site on MySQL to one using MariaDB? What are the fundamental differences?

There are many more questions swirling around in my head, and I hope to find the answers. In the meantime, I followed these steps to install MariaDB-server on my LubuntuLinux machine. The install process removed MySQL so be aware of that.

Here are the relevant parts from the blog entry (thank you!!!):

MariaDB Installation

Let’s start with installation of the MariaDB database.
Following these steps from the official MariaDB website we will, first, need to setup repositories:
sudo apt-get install python-software-properties 
sudo apt-key adv --recv-keys --keyserver 0xcbcb082a1bb943db
sudo add-apt-repository 'deb precise main'
Once the key is imported and the repository added you can install MariaDB with:
sudo apt-get update 
sudo apt-get install mariadb-server
During the installation you will be asked to provide a new password for the MariaDB administrator. You will use this password to create a new database later in this section. . .MariadDB is running on the same port as MySQL.

Great how-to!

At this point, since I’d already installed Drupal (which I’ve been playing around with), I started up phpMyAdmin. Surprisingly, all my databases were there and working, even though it was clear I was now running MariaDB. Absolutely too easy.

Here’s a screenshot via phpMyAdmin:

And a screenshot of Drupal:

MariaDB appeared to work just fine in lieu of MySQL during install of Moodle….

This actually is MariaDB, not MySQL

but then I encountered this error:

For fun, i followed these instructions and this is what I saw…yellow highlight is what I typed. Notice I typed MySQL but MariaDB jumped in!

mg@mga /var/www $ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 84
Server version: 5.5.29-MariaDB-mariadb1~precise-log binary distribution
Copyright (c) 2000, 2012, Oracle, Monty Program Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]> SET GLOBAL binlog_format = ‘ROW’;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> quit

I’m not sure if it will work…yep, it works. Installation of Moodle was successful.

In terms of transitioning, I wonder if switching an existing MySQL-based installation of Moodle to MariaDB will be as easy as the Drupal one, which transitioned when I installed MariaDB.

Anyone else playing around with this?

Everything posted on Miguel Guhlin’s blogs/wikis are his personal opinion and do not necessarily represent the views of his employer(s) or its clients. Read Full Disclosure

var _gaq = _gaq || []; _gaq.push([‘_setAccount’, ‘UA-3445626-5’]); _gaq.push([‘_setDomainName’, ‘’]); _gaq.push([‘_trackPageview’]); (function() { var ga = document.createElement(‘script’); ga.type = ‘text/javascript’; ga.async = true; ga.src = (‘https:’ == document.location.protocol ? ‘https://ssl’ : ‘http://www’) + ‘’; var s = document.getElementsByTagName(‘script’)[0]; s.parentNode.insertBefore(ga, s); })();