CEntos 6.7 Migrating from mysql-server/mysql-community-server into latest MariaDB

Ok, first you should install yum-replace plugin if you haven’t already have it.

Get MariaDB packages repo from MariaDB repos builder here
MariaDB repo builder
You’ll get some repo config text that you can save to /etc/yum.repos.d/MariaDb.repo like these:

Do update your repo chache

If you’re installing mysql-server from CentOS 6.7 default repo, you should do this:

If you’re installing mysql server from webtatic repo (mysql55w-server), you should do this:

If you’re installing from MySQL Community repository, do this:

Just answer with ‘Y’ if the yum replace command show you some conflicts.
Next, just install all MariaDB related packages:

Start MariaDB:

Confirm that you’re using MariaDB:

Don’t worry, if you have successfully installing MariaDB over MySQL:

  1. your web app that use MySQL will not broken, no need to change anything
  2. your data will stay intact (no data loss)
  3. use MySQL commands as usual (such as: mysql -u root -p)
  4. the MariaDB config is still in /etc/my.cnf

In short, business as usual!

Leave a Reply

%d bloggers like this: