How to downgrade MySQL 5 to MySQL 4.1 on CPanel server

From Cosmin's Wiki

Jump to: navigation, search

Home > Linux how to's > How to downgrade MySQL 5 to MySQL 4.1 on CPanel server



It is quite often that people get either a dedicated server or a virtual private server (VPS) which they manage via CPanel. I have myself such a VPS with only 254 MB of RAM and, out of enthusiasm (and necessity) I have upgraded to MySQL 5.0. Then, for several reasons, I decided to go back to MySQL 4.1. However, as I have soon found out, this was no longer possible only by clicking the CPanel interface.

So, here's how to do it, in case you run in the same trouble as I did (I have RedHat Enterprise 3 on my VPS):

Check all mysql rpm’s that are installed:

rpm -qa | grep -i mysql-

Before you do anything, take a backup of /var/lib/mysql

cp -R /var/lib/mysql /var/lib/mysql.backup

Now, you will have to edit the cPanel config file and make some small changes in it

vim /var/cpanel/cpanel.config

Here look for mysql-version=5.0 and change it to mysql-version=4.1

Now, we will forcefully install mysql by the following command:

/scripts/mysqlup –force

You can now check again the installed mysql version:

rpm -qa | grep -i mysql-

Well, that's it. This has really worked for me - you can do it at your own risk.