Guys in this article I will explain how to migrate MariDB to MySQL. 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)
Migrate MariaDB to MySQL
Follow theses below steps to migrate MariaDB to MySQL:
Step #1 : Take Backup
First of all take backup of all your Database using command
# mysqldump –all-databases >mariadbdump.sql
Step #2 : Stop MariaDB Service
Then Stop Mariadb using using below command:
# service mysql stop.
Step #3 : Uninstall MariaDB
Uninstall mariadb using below command:
# apt-get –purge remove “mysql*”
Step #4 : Remove Configuration File or Move
Then Remove configuration file or Move to another location.
Step #5 : Install Fresh MySQL
Now Install Mysql Sever. To install MySQL Sever follow my this below tutorials:
Step #6 : Login to MySQL Sever
Let’s login to freshly installed mysql server.
Step #7 : Restore Database
Finally now restore the databases which you took the back as mentioned above.
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(https://dev.mysql.com/doc/refman/5.6/en/windows-installation.html). 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.