Updated On ” 08/04/2019
About MySQL
MySQL is the world’s most popular open source database. With its proven performance, reliability and ease-of-use, MySQL has become the leading database choice for web-based applications, used by high profile web properties including Facebook, Twitter, YouTube, Yahoo! and many more.
Oracle drives MySQL innovation, delivering new capabilities to power next generation web, cloud, mobile and embedded applications.
You can manage Mysql Installed on a cPanel or Other server, Mysql RPM is managed automatically or can be fixed to use certain version
To avoid the cPanel replaces or accidently installs the cpanel version, a check is placed at /var/cpanel/rpm.versions.d/local.versions
[root@server]# cat /var/cpanel/rpm.versions.d/local.versions
---
file_format:
version: 2
target_settings:
MySQL51: uninstalled
MySQL55: uninstalled
MySQL56: uninstalled
perl526: uninstalled
Now Steps for Upgrading or Downgrading the MySQL version ON Centos/cPanel Server.
For CentOS / cPanel, the filename is /var/cpanel/rpm.versions.d/local.versions
Typical entry for Mysql Upgrade to 5.6
[root@server]# nano /var/cpanel/rpm.versions.d/local.versions
---
file_format:
version: 2
target_settings:
MySQL51: uninstalled
MySQL55: uninstalled
MySQL56: installed
MySQL57: uninstalled
See, MySQL56: installed (changed to installed)
Once you edit the file save by CRTL + S(Save) and CTRL + E(Exit)
[root@server]# /scripts/check_cpanel_rpms
[root@server]# /scripts/check_cpanel_rpms
[2019-04-08 13:32:25 +0530]
[2019-04-08 13:32:25 +0530] Problems were detected with cPanel-provided files which are RPM controlled.
[2019-04-08 13:32:25 +0530] If you did not make these changes intentionally, you can correct them by running:
[2019-04-08 13:32:25 +0530]
[2019-04-08 13:32:25 +0530] > /usr/local/cpanel/scripts/check_cpanel_rpms --fix
[2019-04-08 13:32:25 +0530] The following RPMs are missing from your system:
[2019-04-08 13:32:25 +0530] MySQL56-client-5.6.43-2.cp1170
[2019-04-08 13:32:25 +0530] MySQL56-devel-5.6.43-2.cp1170
[2019-04-08 13:32:25 +0530] MySQL56-server-5.6.43-2.cp1170
[2019-04-08 13:32:25 +0530] MySQL56-shared-5.6.43-2.cp1170
[2019-04-08 13:32:25 +0530] MySQL56-test-5.6.43-2.cp1170
Do you want to repair these RPMs?(y/n): y
[2019-04-08 13:32:39 +0530] Removing 0 broken rpms:
[2019-04-08 13:32:39 +0530] rpm: no packages given for erase
[2019-04-08 13:32:39 +0530] Downloading http://httpupdate.cpanel.net/RPM/11.70/centos/7/x86_64/rpm.sha512
[2019-04-08 13:32:40 +0530] Successfully verified signature for cpanel (key types: release).
[2019-04-08 13:32:40 +0530] Downloading http://httpupdate.cpanel.net/RPM/11.70/centos/7/x86_64/MySQL56-client-5.6.43-2.cp1170.x86_64.rpm
[2019-04-08 13:32:43 +0530] Downloading http://httpupdate.cpanel.net/RPM/11.70/centos/7/x86_64/MySQL56-server-5.6.43-2.cp1170.x86_64.rpm
[2019-04-08 13:32:49 +0530] Downloading http://httpupdate.cpanel.net/RPM/11.70/centos/7/x86_64/MySQL56-test-5.6.43-2.cp1170.x86_64.rpm
[2019-04-08 13:32:55 +0530] Downloading http://httpupdate.cpanel.net/RPM/11.70/centos/7/x86_64/MySQL56-devel-5.6.43-2.cp1170.x86_64.rpm
[2019-04-08 13:32:55 +0530] Downloading http://httpupdate.cpanel.net/RPM/11.70/centos/7/x86_64/MySQL56-shared-5.6.43-2.cp1170.x86_64.rpm
[2019-04-08 13:32:56 +0530] Disabling service monitoring.
[2019-04-08 13:32:56 +0530] Hooks system enabled.
[2019-04-08 13:32:56 +0530] Checking for and running RPM::Versions 'pre' hooks for any RPMs about to be installed
[2019-04-08 13:32:56 +0530] All required 'pre' hooks have been run
[2019-04-08 13:32:56 +0530] No RPMS need to be uninstalled
[2019-04-08 13:32:56 +0530] Installing new rpms: MySQL56-client-5.6.43-2.cp1170.x86_64.rpm MySQL56-devel-5.6.43-2.cp1170.x86_64.rpm MySQL56-server-5.6.43-2.cp1170.x86_64.rpm MySQL56-shared-5.6.43-2.cp1170.x86_64.rpm MySQL56-test-5.6.43-2.cp1170.x86_64.rpm
[2019-04-08 13:32:56 +0530] Preparing packages…
[2019-04-08 13:32:56 +0530] MySQL56-client-5.6.43-2.cp1170.x86_64
[2019-04-08 13:32:59 +0530] MySQL56-test-5.6.43-2.cp1170.x86_64
[2019-04-08 13:33:09 +0530] MySQL56-shared-5.6.43-2.cp1170.x86_64
[2019-04-08 13:33:10 +0530] MySQL56-devel-5.6.43-2.cp1170.x86_64
[2019-04-08 13:33:10 +0530] Giving mysqld 5 seconds to exit nicely
[2019-04-08 13:33:15 +0530] MySQL56-server-5.6.43-2.cp1170.x86_64
If You are looking to downgrade the MySQL version
To Downgrade the MySQL server installed, Follow here
If You are looking to Upgrade the MySQL version in CloudLinux server installed, Follow here
Nice post. Good to have the above steps
I am searching on google how to upgrade mysql on cpanel-centos and I find your post. And after reading your content, hopefully, now we can update. Thank you!