Linux – Migrating from MySQL Server to MariaDB

convertlinuxmariadbMySQL

I've heard that MariaDB has better performance than MySQL-Server. I'm running software that makes an intensive use of MySQL, thats why I want to try upgrading to MariaDB.

Please tell me your experiences doing this conversion, and instructions or tips.

Also, which files I should take care of for making a backup of MySQL-Server, so if something goes wrong with MariaDB, I could rollback to MySQL without issues?
I would use this but I'm not sure if it's enough to get a full backup of MySQL-Server confs and databases:

  • mysqldump –all-databases
  • backup /etc/mysql

My Environment:

uname -a (Debian Lenny)

Linux charizard 2.6.26-2-amd64 #1 SMP Thu Sep 16 15:56:38 UTC 2010 x86_64 GNU/Linux

MySQL Server Version:

Server version          5.0.51a-24+lenny4

MySQL Client: 5.0.51a

Statistics:

Threads: 25  Questions: 14690861  Slow queries: 9  Opens: 21428  Flush tables: 1  Open tables: 128  Queries per second avg: 162.666
Uptime:                 1 day 1 hour 5 min 13 sec

Best Answer

According to the MariaDB website, you do not need to dump anything. Just install the new binaries and reuse existing data directory. See:

http://kb.askmonty.org/v/how-can-i-upgrade-from-mysql-to-mariadb

I would still advise to do a backup though. To be paranoid:

  1. tar cvfz /etc.tar.gz /etc
  2. tar cvfz /var/lib/mysql.backup.tar.gz /var/lib/mysql # while mysql is stopped, as Kevin mentioned
  3. mysqldump --all-databases