10 Reasons for Migrating MySQL to Mariadb

10 Reasons for Migrating MySQL to Mariadb. MariaDB also developed by previous mysql developers, MariaDB also supports GIS and JASON. All mysql connecters such as php, perl, ruby, python, java, MyODBC, .NET and C Connector. Even no need to change MySQL data files uninstall MySQL and install MariaDB packages and attach them work perfectly.

  1. It is very easy to install and compatible to migrate
  2. Speed and Better performance
  3. More storage engines
  4. MariaDB development is more vibrant and open
  5. Quicker and more transparent security releases
  6. More Cutting edge features
  7. Galera active-active master clustering
  8. Migration might become difficult after 2015
  9. MariaDB has leapt in popularity
  10. Oracle stewardship is uncertain

10 Reasons for Migrating MYSQL to Mariadb

Migrate MYSQL to MariaDB procedure
Login into MYSQL with root user

[root@TechTutorials ~]# mysql -u root -p
mysql>show databases;

Backup existing MYSQL databases

[root@TechTutorials ~]# mysqldump --all-databases --user=root --password --master-data > mysqlbackup.sql

Before uninstalling MYSQl you must take backup of my.cnf file

[root@TechTutorials ~]# cp -rf /etc/mysql/my.cnf /opt/my.cnf.bak

Now unintsall mysql procedure

First you have to stop the mysql service

[root@TechTutorials ~]# systemctl stop mysql

Remove mysql packages

[root@TechTutorials ~]# yum remove mysql* mysql-server mysql-devel mysql-libs
[root@TechTutorials ~]# rm -rf /var/lib/mysql

Installing mariadb in RHEL 7

[root@TechTutorials ~]# yum update

create custom MariaDB YUM repository file . Copy and paste it into a file under /etc/yum.repos.d/

[root@TechTutorials ~]# vi /etc/yum.repos.d/MariaDB.repo
[MariaDB]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/rhel7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

:wq
Now install mariadb packages using yum command

[root@TechTutorials ~]# yum install -y MariaDB-server MariaDB-client

Set the database root user password afrer installing mariadb

[root@TechTutorials ~]# mysql_secure_installation

Enable and Start mariadb service

[root@TechTutorials ~]# systemctl start mariadb
[root@TechTutorials ~]# systemctl enable mariadb
[root@TechTutorials ~]# systemctl status mariadb

Copy the content of old bachup file to new my.cnf file

[root@TechTutorials ~]# cp -rf my.cnf.bak /etc/mysql/my.cnf

Now import databases

[root@TechTutorials ~]# mysql -u root -p < mysqlbackup.sql

Import process is completed, log in into MariaDB server

[root@TechTutorials ~]# mysql -u root -p
Password:
MariaDB> show databases;

You can verify mariadb version using below command

[root@TechTutorials ~]# mysql -V

 

That’s it!

Thanks for your wonderful Support and Encouragement

Ravi Kumar Ankam

My Name is ARK. Expert in grasping any new technology, Interested in Sharing the knowledge. Learn more & Earn More

Leave a Reply

Your email address will not be published. Required fields are marked *