How to install mysql that was previously removed?

electric

Well-Known Member
Nov 5, 2001
790
11
318
Hello,

I am trying to update cpanel DNS-Only server to latest version, but I see this error:

[2016-07-12 14:56:55 -0700] All files Staged
[2016-07-12 14:56:55 -0700] Testing if the newly downloaded RPMS can be installed without conflict
[2016-07-12 14:56:55 -0700] Testing RPM transaction
[2016-07-12 14:56:56 -0700] error: Failed dependencies:
[2016-07-12 14:56:56 -0700] MySQL-client is needed by cpanel-php54-horde-5.1.4-12.cp1150.noarch
[2016-07-12 14:56:56 -0700] MySQL-server is needed by cpanel-php54-horde-5.1.4-12.cp1150.noarch
[2016-07-12 14:56:56 -0700] MySQL-client is needed by cpanel-php54-webmail-5.1.1-2.cp1150.noarch
[2016-07-12 14:56:56 -0700] MySQL-server is needed by cpanel-php54-webmail-5.1.1-2.cp1150.noarch
[2016-07-12 14:56:56 -0700] W Exit Code: 184
[2016-07-12 14:56:56 -0700] ***** FATAL: Test install failed: error: Failed dependencies:
I think this means that mysql is maybe not installed? (I think must have been disabled/removed because it's a DNS-Only server and wasn't needed?)

How can I check, and then re-install mysql if needed?

Thanks!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

To update, it looks like this issue was addressed through a support ticket by updating the target settings for the MySQL RPM to "installed", and running the check_cpanel_rpms script:

Code:
/scripts/update_local_rpm_versions --edit target_settings.MySQL55 installed
/scripts/check_cpanel_rpms --fix
Documentation on this script is available at:

How to Set or Unset RPM Management

Let us know if you have any additional questions.

Thank you.
 

electric

Well-Known Member
Nov 5, 2001
790
11
318
Hello. That worked to fix the problem.

However, will making this change result in MySQL *never* being updated by cpanel, even if DNS-Only update eventually upgrades to version 5.6 or higher, etc?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
However, will making this change result in MySQL *never* being updated by cpanel, even if DNS-Only update eventually upgrades to version 5.6 or higher, etc?
It's set to the "installed" state, so it's still managed as an RPM through cPanel. You would need to update the "mysql-version=" entry in /var/cpanel/cpanel.config to "mysql-version=5.6", and then run the following commands if you wanted to use MySQL 5.6:

Code:
/scripts/update_local_rpm_versions --edit target_settings.MySQL55 uninstalled
/scripts/update_local_rpm_versions --edit target_settings.MySQL56 installed
/scripts/check_cpanel_rpms --fix
Thank you.
 

electric

Well-Known Member
Nov 5, 2001
790
11
318
Thanks!

Will DNS-Only server eventually upgrade MySQL on its own once MySQL version 5.5 is dead? Or is there any way to tell cpanel DNS-Only that I want it to totally manage everything?

Or will we need to eventually manually switch to v5.6 once v5.5 is eol?

Lastly.. is there any reason *not* to switch to MySQL 5.6 right now? (Is it compatible with DNS-Only?)

Thanks again.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

Typically, once a new version of cPanel no longer supports MySQL 5.5, when you go to update cPanel, a blocker message will notify you that you are unable to update to a new version of cPanel until you upgrade the version of MySQL on the system. It's acceptable to use MySQL 5.6 on cPanel DNS-Only.

Thank you.