How to replace MySQL Database with MariaDB in cpanel

 

First backup existing MySQL data

Make sure to save all existing data just in case there are any issues.

cp -Rf /var/lib/mysql /var/lib/mysql-old
mv /etc/my.cnf /etc/my.cnf-old

Disable the targets so cPanel no longer handles MySQL updates

The following will mark the versions of MySQL we distribute as uninstalled so they are no longer maintained by cPanel/WHM

/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

Remove existing MySQL RPM’s so theres a clean slate for MariaDB

The below command will uninstall the MySQL RPM’s!

/scripts/check_cpanel_rpms –fix –targets=MySQL50,MySQL51,MySQL55

Create a yum repository for MariaDB

vi /etc/yum.repos.d/MariaDB.repo

place the following inside of it depending on the DISTRO (https://downloads.mariadb.org/mariadb/repositories/):

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5.29/centos6-amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Remove php from the /etc/yum.conf file then run the following commands

yum install MariaDB-server MariaDB-client MariaDB-devel
/etc/init.d/mysql start
mysql_upgrade
/etc/init.d/mysql restart

Add php back to the /etc/yum.conf file to ensure future php updates don’t get clobbered

Rebuild easyapache/php to ensure modules are intact/working

/scripts/easyapache –build

 


Vishwajit Kale

Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostdens, a company that aims to provide reliable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.
Vishwajit Kale

Vishwajit Kale blazed onto the digital marketing scene back in 2015 and is the digital marketing strategist of Hostdens, a company that aims to provide reliable web hosting solutions. Vishwajit is experienced in digital and content marketing along with SEO. He's fond of writing technology blogs, traveling and reading.

Leave a Comment
Share
Published by
Vishwajit Kale

Recent Posts

Green Data Centers To Have Strong Impact On Data Processing And Hosting Service Businesses

About Bizvibe Bizvibe is a B2B online platform that helps in connecting buyers and sellers…

3 years ago

File Server Security Is Important for An Organization: Find out How

File server investment is the smart investment anyone can make for their business. It has…

3 years ago

Cloud Computing Explained

Because of the many advantages of the cloud, people are moving more and more towards…

3 years ago

Cloud to which more and more companies are moving advanced workloads

Cloud Adoption Accelerates IT Modernization. More and more online businesses are increasing more and more…

3 years ago

History of web hosting

Almost more than half of the total world’s population were using the internet by any…

3 years ago

Plesk appoints ZNet Technologies as a global distributor to expand reach in untapped markets

Plesk is an IT service provider company which was founded in 2000 by Dimitri. The…

3 years ago

This website uses cookies.