How to replace MySQL with MariaDB - easy and in less than five minutes!
Here's a quick, easy, and seamless procedure to replace MySQL with MariaDB on a freshly installed system.
Are you ready to finally leave MySQL behind and move on to its next generation replacement, MariaDB?
This tutorial assumes that you haven't initialized any databases in MySQL and therefore have nothing to backup or migrate.
What is MariaDB?
Well, first there came Max, so Monty called his first major creation "MaxDB", which is still in use today, as an enterprise scale offering in several major products. We've got copies of the last couple of completely free versions of MaxDB in our archives, so feel free to pick one up if you want to play.
Next, there was Monty's daughter My, ergo "MySQL". But the Sun eventually did set and the evil-doers lost their most talented developers, while development slowed, and Monty's youngest daughter's namesake was chosen as the FOSS upgrade to MySQL, bearing the name, "MariaDB".
The discussion surrounding what Oracle has done or is going to do with MySQL is another topic entirely, but suffice it to say that there are a lot of hard feelings in the aftermath of Sun's legacy, and adsorption into the dreadnaught referred to by some as the evil, 'EllisonCo'.
What we should say, before we begin, is this:
MariaDB is a backward compatible, drop-in replacement branch of the MySQL(R) Database Server. It includes all major open source storage engines, including the Aria storage engine.
It includes support for the XtraDB and PBXT storage engines, additional server optimization and other features that simply aren't available in the product that MariaDB was forked from.
For those who have been wondering there the "Maria" storage engine, it is alive and well as "Aria", a name change to accommodate the confusion it occasionally raised.
In case it isn't 100% clear yet, MariaDB is Backward compatible with MySQL. Backward compatible...
In other words, unless you need some of the forthcoming capabilities that MariaDB will soon offer in the future, such as enterprise level clustering, MySQL has been... deprecated.
Aside from the compile time itself, this tutorial will walk you through installing MariaDB on your Linux server in less than five minutes.
Let's get started!
The Question: On a fresh installation of Slackware Linux, how do I swap out and replace MySQL for MariaDB?
1.) We begin by selecting a mirror from /etc/slackpkg/mirrors. The following mirror chosen below is but good one to use, but YMMV:
2.) We add the following to /etc/slackpkg/blacklist:
3.) Now we remove MySQL:
# removepkg mysql
4.) Now we install MariaDB and update everything:
# sbopkg -i libevent
# sbopkg -i mariadb
# slackpkg update
# slackpkg update gpg
# slackpkg install-new
# slackpkg upgrade-all
# mysql_install_db --user=mysql
# chmod +x /etc/rc.d/rc.mysqld
# /etc/rc.d/rc.mysqld start
...and you're all done! :)
Feel free to offer any thoughts or suggestions you may have.