Migrating From MySQL to MariaDB
Having read at length about the advantages of MariaDB and Percona in scaling at higher processor core counts and multiple concurrent database accesses, I wanted to try it out for myself. I run applications that do a lot of read/write tasks, updating of table data and most of these talks run concurrently. Well, they do basically everything that’s expected a database should do.
Here you can take a look at some (older) performance graphs, comparing MySQL, MariaDB and Percona.
MariaDB bills itself as a binary drop in replacement for MySQL, so here’s how to do it on a machine running Debian Wheezy.
Shut down MySQL server:
service mysql stop
Make a backup of your MySQL folder and configuration:
cp -Rf /var/lib/mysql /var/lib/mysql-old cp /etc/mysql/my.cnf /etc/mysql/my.cnf-old
Choose your distro and MariaDB version here to get instructions how to add the MariaDB repository.
For Wheezy, you do:
apt-get install python-software-properties apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/debian wheezy main'
apt-get update apt-get install mariadb-server
That’s it. MariaDB will automatically uninstall MySQL 5.5, then installs itself and converts any tables that might need converting. It takes just a couple of minutes and since then my MySQL-based applications run snappier than before under load, especially when using InnoDB.