How to Uninstall MariaDB in a cPanel server

Uninstalling MariaDB is as easy as installing MariaDB. If you ever want to uninstall and roll back to stock MySQL, continue reading for a step-by-step guide to uninstall MariaDB.

Here are the steps to Uninstall MariaDB and return to stock MySQL.


Find and Uninstall MariaDB

cp -Rf /var/lib/mysql /var/lib/mysql-old
mv /etc/my.cnf /etc/my.cnf-old
rpm -qa |grep -i mariadb

The above command will list the MariaDB installations and you can use either rpm -e command or yum to uninstall those RPMs

Enable cPanel native MySQL support

/usr/local/cpanel/scripts/update_local_rpm_versions --edit target_settings.MySQL50 uninstalled

/usr/local/cpanel/scripts/update_local_rpm_versions –edit target_settings.MySQL51 uninstalled /usr/local/cpanel/scripts/update_local_rpm_versions –edit target_settings.MySQL55 installed

Install MySQL 5.5

/usr/local/cpanel/scripts/check_cpanel_rpms --fix --targets=MySQL50,MySQL51,MySQL55

This should install MySQL 5.5 on your server. You may want to run a check and repair database if any is reporting an issue in your log file.

After that, you will need to rebuild PHP so that it will use the new libmysqlclient.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close Menu