Migration from MySQL to MariaDB

Following today updates available in rolling release and shortly in milestone3, MySQL database engine will be replaced by MariaDB.

MariaDB is a drop-in replacement of MySQL thus providing full compatibility, better performance and most important it is based on the GPL license allowing usage in more situations than MySQL license permits.

openmamba sysadmins of MySQL based servers should follow the following instructions to upgrade the database. After installing the new packages by performing a system upgrade run the following command:

sudo mysql_upgrade -u root -p

Then restart MariaDB server with the following command:

sudo systemctl restart mariadb

After that it will be necessary to restart all the services connecting to the MySQL database to start using MariaDB.

Some services will need to modify the pointer to the socket, which has changed from

/tmp/mysql.sock

to

/run/mysqld/mysql.sock

In order to keep all data safe the old MySQL database in /var/lib/mysql5 will not be touched. Instead it will be copied to /var/lib/mysql. Please be sure to have enough free disk space to contain a full copy of the database directory. Once migration has been succesfully completed and checked it will be possible to remove the /var/lib/mysql5 folder with all its content.

 

Share

Leave a Reply