SOLVED Partially botched MySQL 5.6 -> 5.7 update

AndyB78

Well-Known Member
Oct 7, 2003
79
2
158
Romania
cPanel Access Level
Root Administrator
Hello,

I have a slightly more complicated situation on one of our servers. A while ago, I have performed an unattended upgrade to MySQL from 5.6 to 5.7. At some point, I believe that upon 5.7 restart, it failed. I have checked the err log and found out I had a my.cnf line that was incompatible with 5.7. I removed that line from my.cnf and I was able to restart it.

Now unfortunately one of the sites was not working but as a matter of fact the error was related to a mysql database:

Table mysql/innodb_index_stats has length mismatch in the column name table_name. Please run mysql_upgrade

I ran the following:
mysqlcheck --all-databases --check-upgrade --auto-repair
mysqlcheck --all-databases --check-upgrade --fix-db-names --fix-table-names
mysql_upgrade

Some of these helped because the site was up and running and left it like this. I thought this was the end of it.

Now cPanel is no longer updating due to cPanel rpm package errors:
Code:
[2019-03-19 16:12:19 +0200]   The following RPMs are missing from your system:
[2019-03-19 16:12:19 +0200]   MySQL56-client-5.6.43-2.cp1170
[2019-03-19 16:12:19 +0200]   MySQL56-devel-5.6.43-2.cp1170
[2019-03-19 16:12:19 +0200]   MySQL56-server-5.6.43-2.cp1170
[2019-03-19 16:12:19 +0200]   MySQL56-shared-5.6.43-2.cp1170
[2019-03-19 16:12:19 +0200]   MySQL56-test-5.6.43-2.cp1170
Furthermore, if I go to MySQL/MariaDB Upgrade in WHM I get this:

Code:
Warning: The last run of the MySQL upgrade wizard failed. If you have corrected the problems that led to this failure it is highly recommended that you resume your previous upgrade rather than beginning a new one.


Current step number: 4
Starting MySQL/MariaDB version: 5.7
Selected MySQL/MariaDB version: 5.7
Upgrade Type: Unattended Upgrade
Now I believe the upgrade was done but there are some cleanup problems:
Code:
root [~]# mysql -V
mysql  Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using  EditLine wrapper
Now before braking it even worse, what should I do next? I tend to resume the WHM wizard but first I'd need some feedback preferably also from cPanel staff.

Thanks!
 

AndyB78

Well-Known Member
Oct 7, 2003
79
2
158
Romania
cPanel Access Level
Root Administrator
Hi,

Well, it's the old version:

root [~]# grep mysql-version /var/cpanel/cpanel.config
mysql-version=5.6

This is a bit unexpected because when I go to a user's cPanel -> Server Information for instance, it gives me the new version:
MySQL Version 5.7.25

Thanks!
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,255
313
Houston
Hi @AndyB78


That's actually what I expected to see in this instance. You're definitely running the updated version but cPanel isn't seeing that internally and it's looking for the RPM's for the older version.


If you change the value manually here do you continue to get the missing packages notification on update?
 

AndyB78

Well-Known Member
Oct 7, 2003
79
2
158
Romania
cPanel Access Level
Root Administrator
Hi,

Yes, you were right. If I manually set mysql version in cpanel.config I no longer get the check_cpanel_rpms error.

But I still get the MySQL/MariaDB Upgrade warning.

Thanks!
 

Amithalder

Registered
Feb 17, 2020
4
1
3
New Delhi, India
cPanel Access Level
Root Administrator
Warning

The last run of the MySQL upgrade wizard failed. If you have corrected the problems that led to this failure it is highly recommended that you resume your previous upgrade rather than beginning a new one.
Upgrade Details


Current step number:4
Starting MySQL/MariaDB version:8.0
Selected MySQL/MariaDB version:8.0
Upgrade Type:Unattended Upgrade