If you’ve upgraded MySQL via WebHost manager, the downgrade process is slightly more complex than the upgrade. This tutorial mainly covers a downgrade from 4.1 to 4.0, but also applies to downgrading from 5.x to 4.x.
*Back up all databases before proceeding, as all existing databases will be deleted!
1. Uninstall existing MySQL packages:
rpm -qa | grep -i mysql-
This should return a list of several rpm’s installed. You will need to remove them all with the rpm -e command .
2. Delete the active MySQL directory:
rm -Rfv /var/lib/mysql
3. Get cPanel Ready
Edit /var/cpanel/cpanel.config and change the version to the one that you are downgrading to (4.0, 4.1, etc)
Make sure that MySQL updates aren’t being skipped:
4. Install MySQL:
5. Update the perl module:
/scripts/perlinstaller –force Bundle::DBD::mysql
Finally, recompile Apache and PHP via Web Host Manager.