I recently added a post about upgrading MySQL from 5.1 to 5.5 in cPanel – Upgrade MySQL in cPanel via Command line. You can also do this from the cPanel frontend. But once you upgraded, how to downgrade this back to version 5.1? There is an easy way to downgrade MySQL. The same method that I explained in the previous post to upgrade MySQL. In the main cPanel configuration file, the MySQL version must be specified as 5.5 ( mysql-version=5.5 ). Let’s change that to 5.1 and run the “/scripts/check_cpanel_rpms –fix”, so the script will check the cPanel configuration file and find that the 5.1 packages are not installed. It will remove 5.5 packages and will install the 5.1.
Note: Take all necessary backups before proceeding and do it at your own risk.
Please find the steps and logs below.
Downgrade MySQL in cPanel
Check the MySQL version
root# mysql -e "select version();"; +------------+ | version() | +------------+ | 5.5.32-cll | +------------+
Now replace the 5.5 MySQl version with 5.1 in “/var/cpanel/cpanel.config”
root# sed -i 's/mysql-version=5.5/mysql-version=5.1/g' /var/cpanel/cpanel.config
Execute the following script.
/scripts/check_cpanel_rpms –fix
Note: You will see “Error : Unknown table engine ‘PERFORMANCE_SCHEMA’” that is because 5.1 doesn’t have this table engine.
When the script completed the execution, check the version.
root# mysql -e "select version();"; +------------+ | version() | +------------+ | 5.1.70-cll | +------------+
See! It’s downgraded to 5.1. So that’s how you do the MySQL downgrade in cPanel.