Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED Partially botched MySQL 5.6 -> 5.7 update

Discussion in 'Database Discussion' started by AndyB78, Mar 19, 2019.

  1. AndyB78

    AndyB78 Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    67
    Likes Received:
    1
    Trophy Points:
    158
    Location:
    Romania
    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!
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,442
    Likes Received:
    503
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @AndyB78


    What's listed for MySQL in the cPanel config file?

    Code:
    grep mysql-version /var/cpanel/cpanel.config
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. AndyB78

    AndyB78 Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    67
    Likes Received:
    1
    Trophy Points:
    158
    Location:
    Romania
    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!
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,442
    Likes Received:
    503
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. AndyB78

    AndyB78 Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    67
    Likes Received:
    1
    Trophy Points:
    158
    Location:
    Romania
    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!
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,442
    Likes Received:
    503
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @AndyB78


    Great, does it let you resume the previous upgrade?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. AndyB78

    AndyB78 Well-Known Member

    Joined:
    Oct 7, 2003
    Messages:
    67
    Likes Received:
    1
    Trophy Points:
    158
    Location:
    Romania
    Hi @Lauren,

    Yes, it completed the upgrade and then the cPanel update to the latest release worked fine. Thanks for your help!
     
  8. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,442
    Likes Received:
    503
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Awesome! I'm so happy to hear that. Thanks for letting us know!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice