How To Migrate MariaDB to MySQL

Hello everyone. Today, I was working in my office and my manager comes to me & told me to migrate mariadb to mysql. So, I have checked the current version of MariaDB using Command: MariaDB [(none)]> select version();

So I Got result shown Below

| version() |
| 5.3.12-MariaDB-mariadb122~lucid-log |
1 row in set (0.00 sec)

Then I was follow some steps given below

Step-1:- Take backup of all your Database using command: mysqldump –all-databases >mariadbdump.sql

Step-2:-Then Stop Mariadb using: service mysql stop.

Step-3:-Uninstall mariadb using :sudo apt-get --purge remove "mysql*"

Step-4:- Then Remove configuration file or Move to another location.

Step-5:- Install Mysql. (For installation mysql check the link

Step -6:- Login to freshly installed mysql .

Step- 7:-Restore the databases using source command.

The steps above given are very simple. These steps are not for beginner DBA. These steps help someone having quite knowledge of mysql installation and up-gradation.

Installing of Mysql

Mysql installation is very easy no need to think so much. First, You should know on which platform you want to install mysql. If you want to install on windows OS then don’t worry and don’t think to much( If you want to install on Linux then you should know your platform support yum repository or apt repository.

Before installing you should know about rpm package or binary package. If you are new to linux or database then you should install binary package. Here i am telling you some steps of installation mysql 5.7 on ubuntu server.

First Check your Ubuntu Server is connected to internet.

Then used these commands given  below

[[email protected] ~] $ sudo apt-get install mysql-community server

After checking the packages it asks with you ( Y or N)

Press Y for installation. Then it installs automatically. You just need to set password for root user.

I hope this article will help in changing mariadb to mysql up-gradation.

Thank You

Thank you! for visiting LookLinux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website To become an author at Look Linux Submit Article. Stay connected to Facebook.

About the author


Leave a Comment