Correct method of upgrading MariaDB from cPanel 11.46 to 11.48
-
Hello :) Per that document: This document describes an unsupported workaround that is not guaranteed to work in the future. After these steps are performed on a server, it is the system administrator's responsibility to manage and maintain the server's database software.
You would have to uninstall MariaDB, revert back to MySQL, and then use the supported method of upgrading to MariaDB so that it's managed through cPanel. I suggest opening a feature request if you want an option to convert from an unsupported installation of MariaDB to a supported installation of MariaDB: Submit A Feature Request Thank you.0 -
Many thanks for your response. Following your suggestion, we have reverted back to MySQL and are now able to upgrade MariaDB using the cPanel-supported method introduced in 11.48. Here is a guide for those who had previously used the unsupported method of converting from MySQL to MariaDB: How to Revert from MariaDB (cPanel-unsupported version) back to MySQL (cPanel-supported version) 1. Run the following commands to back up your existing MariaDB databases and data: cp -a /var/lib/mysql /var/lib/mysql.mariadb-old cp -a /etc/my.cnf /etc/my.cnf.mariadb-old
2. Run the following command:cat /var/cpanel/rpm.versions.d/local.versions
Verify that you currently have the following entries (among others):target_settings: MySQL50: uninstalled MySQL51: uninstalled MySQL55: uninstalled MySQL56: uninstalled
3. Run the following commands to re-enable the MySQL RPM targets:/scripts/update_local_rpm_versions --del target_settings.MySQL50 /scripts/update_local_rpm_versions --del target_settings.MySQL51 /scripts/update_local_rpm_versions --del target_settings.MySQL55 /scripts/update_local_rpm_versions --del target_settings.MySQL56
4. To confirm that the settings in the /var/cpanel/rpm.versions.d/local.versions file no longer override the cPanel-provided defaults for the RPM target, run the following command again:cat /var/cpanel/rpm.versions.d/local.versions
Verify that you no longer see the MySQL entries that you saw in step 2. 5. Run the following command to remove the MariaDB yum repository file:rm -rf /etc/yum.repos.d/MariaDB.repo
6. Run the following command to uninstall MariaDB:yum remove MariaDB-server MariaDB-client MariaDB-devel MariaDB-common MariaDB-compat
7. Run the following command to reinstall the MySQL RPMs provided by cPanel:/scripts/check_cpanel_rpms --fix
8. Run the following command to restore your my.cnf file:cp -a /etc/my.cnf.mariadb-old /etc/my.cnf
9. Run the following command to restart MySQL:service mysql restart
10. Run the following command to rebuild EasyApache's PHP to ensure that all PHP modules remain intact:/scripts/easyapache --build
11. All done! You are now running the cPanel-supported version of MySQL. You may now log into WHM and use the 'MySQL/MariaDB Upgrade' section to upgrade to the supported version of MariaDB, if desired.0 -
Thanks Valetia, your steps worked beautifully for me. 0 -
Will this work for CloudLinux? It's SQL monitor only supports certain versions of MariaDB and from what the documentation states, they appear to be older. 0 -
Will this work for CloudLinux? It's SQL monitor only supports certain versions of MariaDB and from what the documentation states, they appear to be older.
Yes, Cloud Linux and MySQL Governor support MariaDB. Thank you.0 -
So this process will allow us to switch back to MySQL, so we can install an older version of MariaDB that is supported by MySQL Governor... There is no steps that would allow MySQL Governor to work with the latest stable release of MariaDB 10.0+ without going backwards? 0 -
I was not using CloudLinux with MySQL Governor, as I wanted to switch from the unsupported MariaDB install to the Cpanel supported one, and then, in turn, install the MySQL Governor the correct way after installing the CloudLinux supported version of MariaDB. I followed these steps to the 'T' and for the most part things went well. All sites failed to load as the mysql DB failed to start after following the instructions. This is the error I received. root@panel [/usr/local/etc]# service mysql restart /usr/bin/my_print_defaults: Can't read dir of '/etc/my.cnf.d' (Errcode: 2) Fatal error in defaults handling. Program aborted /usr/bin/my_print_defaults: Can't read dir of '/etc/my.cnf.d' (Errcode: 2) Fatal error in defaults handling. Program aborted ERROR! MySQL server PID file could not be found! /usr/bin/my_print_defaults: Can't read dir of '/etc/my.cnf.d' (Errcode: 2) Fatal error in defaults handling. Program aborted Starting MySQL. ERROR! The server quit without updating PID file (/var/lib/mysql/panel.host.com.pid).
I had to manually create a directory named "my.cnf.d" located within "/etc" as somehow the removal of the original MariaDB packages removed the directory. This caused the SQL server to fail to start. I ran "service mysql restart" and the sql server managed to start. All DB information was incorrect though, as in every Wordpress Site on the server went directly to the "installation mode" I quickly ran the MariaDB upgrade from within Cpanel and the issues have been resolved. A bit scary method to switch, but it is done nonetheless with no missing data, but a few complaints :)0 -
Also, if you run into the Warning: mysql_connect(): Headers and client library minor version mismatch.
I had to deselect the mysql* check marks I had enabled, and reenable them, comfirming each selection, then rebuild.0 -
The current issue at hand is now the cpanel server says that MySQL is not running and it is reporting version 10.0.20 of MariaDB when mysql -V clearly shows: root@panel [/etc/my.cnf.d]# mysql -V mysql Ver 15.1 Distrib 10.0.19-MariaDB, for Linux (x86_64) using readline 5.1
Now I am getting repeated emails about MySQL being down, but it is not down, it is running fine with the MariaDB governor in effect. How do I go about removing the annoying errors of the mismatched versions? Thanks0
Please sign in to leave a comment.
Comments
11 comments