In my last post Upgrading CentOS 6.5 to CentOS 7.2 I upgraded the CentOS server, my next job was to upgrade MySQL to MariaDB. In CentOS 7 the default database is now MariaDB so in this post I will show the steps I took to do this.

If you’ve now already done so and you should have before upgrading the server backup your database see my post A Quick MySQL Backup And Restore on doing this, the remove MySQL with

Once done then install the default MariaDB with

Then start MariaDB and enable it to start at boot time

Then run

and follow the instruction you can use the default settings.

Because we didn’t remove are databases when we removed MySQL they have now been adopted by MariaDB this is because MariaDB is a drop in replacement for MYSQL but also I found the user table was corrupted so to fix this issue run mysqlcheck and enter your db password when prompted

Once done use the upgrade tool to fix any problems with the tables and again enter your db password when prompted

And that should be it you have now successfully upgraded MySQL to MariaDB

Thanks and enjoy