How to Upgrade MySQL Within cPanel or Using SSH

You can think of cPanel as your hosting nerve centre. You can accomplish anything you need to do within cPanel. One function of cPanel is managing MySQL databases and users. In this knowledgebase article, we are going to cover how to check the version of MySQL you are running, and also how to upgrade it to version 5.x.

Checking Your Current MySQL Version

First, log in to your cPanel, and then choose the Server Configuration option, and then Tweak Settings. You will find MySQL in this section, and a radio button that allows you to select 4.x or 5.x. Whichever is selected is the version you are using.

Alternatively, you can log in using SSH and check the file /var/cpanel/cpanel.config and within this file, you will see the MySQL version in use.

How to Choose Your MySQL Version

There are two options here. You can either use the previously mentioned radio button to select the new MySQL version, or you can log in via SSH and edit the file /var/cpanel/cpanel.config changing the MySQL version to 5.x.

Completing the MySQL Upgrade

Once you have changed your MySQL version, you need to perform a final step. Log in using SSH and run the following scrips:

/scripts/upcp –force

/scripts/mysqlup –force

It may take a short time for the MySQL upgrade to complete. Once it does, check your current MySQL using the methods outlined above to ensure the upgrade was successful.

Useful links:

The official cPanel knowledgebase article on how to upgrade MySQL and MariaDB

If you have outgrown your shared hosting plan, 365hosts can provide you with a simple upgrade path, using either one of our VPS hosting plans, or your own dedicated server. Call us to talk over your options, so we can advise you on the best plan for your needs.

Was this answer helpful? 60 Users Found This Useful (6 Votes)