WebHostingPeople Blog

  • Domains
    • Shared Hosting

  • Cloud VPS
  • Servers
    • Client Area Login

How Can We Help?

How to Replace MySQL With MariaDB on a cPanel Server?

You are here:

Be taught find out how to Swap MySQL With MariaDB on a cPanel Server?

MariaDB is unquestionably one of many globally accepted database servers on the planet. It’s created by the MySQL builders and assured to stay open supply. MariaDB is an improved various for MySQL. MariaDB 5.1, 5.2, and 5.Three are appropriate with MySQL 5.1, and MySQL 5.5 can also be appropriate with MariaDB 5.5. It consists of the XtraDB storage engine as a substitute for InnoDB. MariaDB is developed as an open supply software program and as a relational database, it supplies an SQL interface for accessing information. The most recent variations of MariaDB embrace GIS and JSON options. On this tutorial, let us take a look at how we are able to interchange the present MySQL with MariaDB.

1) Log in to your server through SSH as root.

# ssh root@IPaddress

2) To forestall information loss, create a backup of the present mysql information.

# cp -Rf /var/lib/mysql /var/lib/mysql_backup

#  mv /and so forth/my.cnf /and so forth/my.cnf.backup

3) Be certain that you’ve disabled the targets in order that cPanel will not deal with MySQL updates.

# /scripts/update_local_rpm_versions –edit target_settings.MySQL50 uninstalled

# /scripts/update_local_rpm_versions –edit target_settings.MySQL51 uninstalled

# /scripts/update_local_rpm_versions –edit target_settings.MySQL55 uninstalled

4) Now it’s important to take away all of the MySQL RPM’s from the server.

# /scripts/check_cpanel_rpms –repair –targets=MySQL50,MySQL51,MySQL55

5) You should create a Yum repository for MariaDB, create a file named “MariaDB.repo” inside the directory /etc/yum.repos.d/

# vi /and so forth/yum.repos.d/MariaDB.repo

Paste the following entries inside the newly created file.

[mariadb]

name = MariaDB

baseurl = http://yum.mariadb.org/5.5.34/centos7-amd64/

gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

gpgcheck=1

6) After completing the above steps, install MariaDB.

# yum install MariaDB-server MariaDB-client MariaDB-devel

7) Now start the MySQL service.

# systemctl start mysql.service

8) Then upgrade the mysql.

# mysql_upgrade

9) After the upgrade, restart the mysql service.

# systemctl restart mysql.service

10) Finally, recompile Apache with PHP to finish the replacement.

# /scripts/easyapache –build

Therefore, we have now replaced MySQL with MariaDB. You can verify it by executing the following command.

# mysql -V

 

If you need any further assistance, please contact our support department.

 

 

Post Your Comment