How to upgrade/downgrade MySQL version in cPanel server

You can easily change the major version of MySQL running on your server through WHM, keeping in mind that the actual version will be dependent on what cPanel has released in their repository.

WHM >> Software >> MySQL Upgrade >> Select between "MySQL 5.1" or "MySQL 5.5"

To change the MySQL version below 5.1, edit the file /var/cpanel/cpanel.config and look for this line:


Then change the version number to the major version that you want to downgrade to. For instance, 4.0, 4.1 or 5.0.

Then save the file and run the following script:

# /scripts/mysqlup --force

Now re-run apache build (easyapache) script so it can build php-mysql connector:

# /scripts/easyapache 

The method described would be performed at one's own risk. A manual downgrade is not recommended and can incur significant risk when attempted on an existing system. A full backup of the MySQL data directory is advised, and for a proper downgrade one should consider using mysqldump to create an SQL dump before downgrading.

Please ensure to thoroughly read the official MySQL documentation regarding downgrades:

Cheers :)


Popular posts from this blog

12 tweakings for WHM/cPanel to speed up WordPress

Error: could not open mime types config file

Disabling open relay on cPanel server