The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL Invalid Version Error

Discussion in 'General Discussion' started by doropezaTSV, Jan 11, 2016.

  1. doropezaTSV

    doropezaTSV Member

    Joined:
    Nov 17, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Venezuela
    cPanel Access Level:
    Root Administrator
    Hello,

    I have a server with WHM 54.0 (build 0) and I´m getting the following error when I try to use some fetaures for MySQL

    And if I go to some cpanel client and try to open the MySQL Manager, another error relative to the version appears and we can´t add/edit users, databases and permissions.
    However I still can connect and use the database with phpmyadmin and the websites are working.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Please post the output from the following commands so we may attempt to reproduce the issue:

    Code:
    grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype ; grep CPANEL= /etc/cpupdate.conf ; httpd -v ; php -v ; mysql -V
    cat /var/cpanel/rpm.versions.d/local.versions
    Also, could you let us know which theme this is happening on?

    Thank you.
     
  3. doropezaTSV

    doropezaTSV Member

    Joined:
    Nov 17, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Venezuela
    cPanel Access Level:
    Root Administrator
    Hello,

    The grep command throw this info:
    The cat command give me this:
    The most of clients are using the X3 theme, I have changed one to paper_latern and the "MySQL databases" option works in his Cpanel. However the WHM still has problems at options like "MySQL/MariaDB upgrade" (Only one theme (x) is installed.)
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Are you using a custom instance of MySQL 5.5? If not, please return it to the original managed state with this command:

    Code:
    /usr/local/cpanel/scripts/update_local_rpm_versions --del target_settings.MySQL55
    Thank you.
     
  5. doropezaTSV

    doropezaTSV Member

    Joined:
    Nov 17, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Venezuela
    cPanel Access Level:
    Root Administrator
    If I do that command, wich version of MySQL will the server manage?. I have to be sure that the MySQL service won´t be uninstalled.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    It should utilize MySQL 5.5. Note that it's already defined as "uninstalled". Running the above commands allow for cPanel to manage the MySQL installation. You can also ensure version 5.5 is utilized in the /var/cpanel/cpanel.config file:

    Code:
    # grep mysql-version /var/cpanel/cpanel.config
    mysql-version=10.0
    Thank you.
     
  7. Eric Visser

    Eric Visser Registered

    Joined:
    Jan 18, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Netherlands
    cPanel Access Level:
    Root Administrator
    Hello,
    I have the same issue when trying to visit "SQL Services" > "Show MySQL Processes" page. It ends up with following error:
    I'm using Percona Server as MySQL server. The following error started to occur when cPanel was upgraded to WHM 54.0 (build 0) version and still remains on WHM 54.0 (build 1).
    Still, MySQL and phpMyadmin work fine.

    My Versions:
    Code:
    # grep '' /etc/redhat-release /usr/local/cpanel/version /var/cpanel/envtype ; grep CPANEL= /etc/cpupdate.conf ; httpd -v ; php -v ; mysql -V
    
    /etc/redhat-release:CentOS Linux release 7.2.1511 (Core)
    /usr/local/cpanel/version:11.54.0.1
    /var/cpanel/envtype:standard
    CPANEL=current
    Server version: Apache/2.4.16 (Unix)
    Server built:   Aug 31 2015 08:27:05
    Cpanel::Easy::Apache v3.30.5 rev9999
    PHP 5.6.12 (cli) (built: Aug 31 2015 08:31:58)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
        with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    mysql  Ver 14.14 Distrib 5.6.28-76.1, for Linux (x86_64) using  6.2
    Code:
    # cat /var/cpanel/rpm.versions.d/local.versions
    ---
    file_format:
      version: 2
    install_targets: {}
    
    rpm_locations: {}
    
    srpm_sub_packages: {}
    
    srpm_versions: {}
    
    target_settings:
      MariaDB100: uninstalled
      MariaDB101: uninstalled
      MySQL50: uninstalled
      MySQL51: uninstalled
      MySQL55: uninstalled
      MySQL56: uninstalled
      easy-tomcat7: uninstalled
    url_templates: {}
    I also tried to edit regular expression in "/usr/local/cpanel/Cpanel/MysqlUtils/Version.pm line 289" to make it pass for my case (see here fiddle.re/n5hat6 and result here i.imgur.com/SRBLwos.png). But I cannot make cPanel to use new "patched" version of Cpanel/MysqlUtils/Version.pm file, it still uses old version, even server reboot,
    "/usr/local/cpanel/scripts/upcp --force" and "/usr/local/cpanel/bin/rebuild-templates" did not affect this and old version is still used.

    Is it possible to fix this somehow? Or how I can reset those "caches" which does not allow new version of Version.pm to be used?
     
    #7 Eric Visser, Jan 18, 2016
    Last edited by a moderator: Jan 18, 2016
  8. doropezaTSV

    doropezaTSV Member

    Joined:
    Nov 17, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Venezuela
    cPanel Access Level:
    Root Administrator
    Hi,

    I did the command
    as recommended before.

    However the upcp reports errors for the upgrade at the MySQL version check like this one

    Also I´m getting some RPM problems
    I've executed the /usr/local/cpanel/scripts/check_cpanel_rpms --fix command and I got the following results...

     
    #8 doropezaTSV, Jan 18, 2016
    Last edited by a moderator: Jan 18, 2016
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    This is a known issue when using Percona. Internal case CPANEL-3692 is open to ensure the MySQL version parser functions as expected for longer version numbers. You can follow our change log to see when a resolution has been released:

    Change Logs - Documentation - cPanel Documentation

    The output suggests Percona was installed on the system at some point in time, leading to the issue described above. Your initial posts suggest that you are using the default instance of MySQL. Could you clarify if you have installed Percona?

    Thank you.
     
  10. doropezaTSV

    doropezaTSV Member

    Joined:
    Nov 17, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Venezuela
    cPanel Access Level:
    Root Administrator
    No I haven´t installed the Percona as far as I know. The server was installed by the dataserver IT and the rest of the administration is made by my company, but we work with the cpanel and centos6's standard software.
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The output you provided suggests Percona was installed at some point. You can follow the post here for information on how to switch back to MySQL (The post is designed for MariaDB, so you can simply replace MariaDB for Percona where necessary):

    Correct method of upgrading MariaDB from cPanel 11.46 to 11.48

    Thank you.
     
  12. Eric Visser

    Eric Visser Registered

    Joined:
    Jan 18, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Netherlands
    cPanel Access Level:
    Root Administrator
    Thank you, Michael.
    Will wait for fix.
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    To update, the resolution for this issue was included with cPanel version 54.0.5:

    Fixed case CPANEL-3692: Fix MySQL version parser for Percona server versions.

    Thank you.
     
Loading...

Share This Page