Switching from MySQL to MariaDB

MariaDB (https://mariadb.org/) is a replacement for MySQL which is compatible. To test this I replaced MySQL on my recently upgraded Ubuntu 15.04 and found it works! Here is what I did.

First remove mysql but do NOT remove the database when asked if you want i.e. keep the database:
sudo apt-get remove –purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
This removed tango-db and tango-accesscontrol too. Don't worry.

Install MariaDB:
sudo apt-get install mariadb-server

Reinstall tango-db:
sudo apt-get install tango-db

I had a problem with the root user not being able to login without doing sudo. This is a known problem and the fix is here http://ubuntuforums.org/showthread.php?t=2275033. The solution is:
hell$ sudo mysql -u root
MariaDB [mysql] use mysql;
MariaDB [mysql] update user set plugin='' where User='root';
MariaDB [mysql] flush privileges;
MariaDB [mysql] \q

I encountered another problem with the tango user password for the the tango database server. The problem was the user could not login. Trying to reconfigure the database user with the command:
sudo dpkg-reconfigure tango-db

The solution was to edit the password in the tango system configuration file /var/lib/tango/.my.cnf
Hi Andy,


Did you install MariaDb on production or did further tests?
MariaDb is the default package on CentOS 7 and wonder if it is fully compatible.

/Vincnet
Vincent Hardion
Control System
MAX IV Laboratory
 
Register or login to create to post a reply.