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.
- It is very easy to install and compatible to migrate
- Speed and Better performance
- More storage engines
- MariaDB development is more vibrant and open
- Quicker and more transparent security releases
- More Cutting edge features
- Galera active-active master clustering
- Migration might become difficult after 2015
- MariaDB has leapt in popularity
- 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