How to upgrade MySQL version via SSH (5.0/5.1/5.5/5.6)

Article Details
URL: http://www.mochasupport.com/kayako/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=698
Article ID: 698
Created On: 04 Jul 2016 10:44 PM

Answer IMPORTANT NOTE: After you upgrade MySQL, there is no supported way to downgrade to the previous version. There will be downtime of the MySQL service during the upgrade process. You should take a backup of the existing database system before you proceed.


In order to upgrade MySQL version via SSH, you have to login as root in your server on console.

1. You have to find file  /var/cpanel/cpanel.config and open it with a text editor like vi,vim, nano, etc.

For example: nano /var/cpanel/cpanel.config

and then change "mysql-version=5.5" to "mysql-version=5.6".

You have to save the file.

2. Execute /usr/local/cpanel/scripts/check_cpanel_rpms --fix  under screen

3. After the process is done you can review the MySQL version with: mysql -V

If you upgrade from MySQL 5.0 or 5.1 to MySQL 5.5 or 5.6 , you have to recompile your Apache and PHP. This could be done with the following command:

/usr/local/cpanel/scripts/easyapache

Note: If your MySQL version is 5.0 you should first upgrade to MySQL 5.1 and after that you will be able to upgrade to MySQL 5.5 and after that upgrade to 5.6. It is highly recommended to take backups of your databases before you start with the upgrade process.