Upgrading MySQL to MariaDB in CentOS 7.2

Upgrading MySQL to MariaDB in CentOS 7.2

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

yum remove mysql mysql-client compat-mysql51.x86_64 mysql-libs.x86_64

Once done then install the default MariaDB with

yum install mariadb-server mariadb

Then start MariaDB and enable it to start at boot time

systemctl start mariadb
systemctl enable mariadb

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

mysqlcheck -uroot -p --all-databases --check-upgrade --auto-repair

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

mysql_upgrade -uroot -p --force

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

Thanks and enjoy

25/01/2016 08:11:00 Shaun Freeman Filed Under: MySQL CentOS, Linux, MariaDB, MySQL, Server

Twitter Feed
Shaun Freeman @Zendmaster

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/8nGfvmdsI2 From Carnivore Diet to Near-Death: Lessons Learned From Today's Most Popular Fad Diet

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/EFLh2y3I24 Carnivore Diet – Myths about Meat – Phil Escott – WHIS 2018

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/dTcBFM4q5A WHY I STOPPED BEING VEGAN | MY STORY

Shaun Freeman @Zendmaster

I liked a @YouTube video https://t.co/RVuVCieSsD Dr. Paul Mason - 'Low Carb from a Doctor's perspective'

Shaun Freeman @Zendmaster

I added a video to a @YouTube playlist https://t.co/MFRRuBG23F It's Already Too Late - Elon Musk