Skip to main content

MySQL Invalid Version Error

Comments

12 comments

  • cPanelMichael
    Hello :) Please post the output from the following commands so we may attempt to reproduce the issue:
    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.
    0
  • doropezaTSV
    Hello, The grep command throw this info: /etc/redhat-release:CentOS release 6.7 (Final) /usr/local/cpanel/version:11.54.0.1 /var/cpanel/envtype:standard CPANEL=current Server version: Apache/2.2.27 (Unix) Server built: Aug 5 2014 07:41:55 Cpanel::Easy::Apache v3.26.3 rev9999 PHP 5.4.31 (cli) (built: Aug 5 2014 07:47:59) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies with XCache v3.1.0, Copyright (c) 2005-2013, by mOo with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd., and with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies with XCache Cacher v3.1.0, Copyright (c) 2005-2013, by mOo mysql Ver 14.14 Distrib 5.5.38-35.2, for Linux (x86_64) using readline 5.1
    The cat command give me this: file_format: version: 2 install_targets: {} rpm_locations: {} srpm_sub_packages: {} srpm_versions: {} target_settings: MySQL50: uninstalled MySQL51: uninstalled MySQL55: uninstalled clamav: installed easy-tomcat7: installed horde: uninstalled url_templates: {}
    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.)
    0
  • cPanelMichael
    MySQL55: uninstalled

    Are you using a custom instance of MySQL 5.5? If not, please return it to the original managed state with this command:
    /usr/local/cpanel/scripts/update_local_rpm_versions --del target_settings.MySQL55
    Thank you.
    0
  • doropezaTSV
    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.
    0
  • cPanelMichael
    New 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.

    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:
    # grep mysql-version /var/cpanel/cpanel.config mysql-version=10.0
    Thank you.
    0
  • Eric Visser
    Hello, I have the same issue when trying to visit "SQL Services" > "Show MySQL Processes" page. It ends up with following error: undef error - Invalid version: 5.6.28-76.1-log at /usr/local/cpanel/Cpanel/MysqlUtils/Version.pm line 289. A warning occurred while processing this directive. [SPOILER="Stacktrace"> Invalid MySQL version cache: "5.6.28-76.1-log" at /usr/local/cpanel/Cpanel/MysqlUtils/Version.pm line 120. at /usr/local/cpanel/Cpanel/MysqlUtils/Version.pm line 120. Cpanel::MysqlUtils::Version::__ANON__(__CPANEL_HIDDEN__...) called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 103 Try::Tiny::try(CODE(0x6892008), Try::Tiny::Catch=REF(0x6891fd8)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Version.pm line 121 Cpanel::MysqlUtils::Version::__ANON__() called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 80 eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/Try/Tiny.pm line 71 Try::Tiny::try(CODE(0x6723088), Try::Tiny::Catch=REF(0x48056f0)) called at /usr/local/cpanel/Cpanel/MysqlUtils/Version.pm line 126 Cpanel::MysqlUtils::Version::current_mysql_version() called at /usr/local/cpanel/Cpanel/MysqlUtils/Version.pm line 78 Cpanel::MysqlUtils::Version::mysqlversion() called at /usr/local/cpanel/Cpanel/Template/Plugin/Mysql.pm line 40 Cpanel::Template::Plugin::Mysql::_mysqlversion_as_root() called at /usr/local/cpanel/Cpanel/Template/Plugin/Mysql.pm line 34 Cpanel::Template::Plugin::Mysql::mysqlversion(Cpanel::Template::Plugin::Mysql=HASH(0x672a0d0)) called at /usr/local/cpanel/whostmgr/docroot/templates/warnings/mysql_version.tmpl line 2 eval {...} called at /usr/local/cpanel/whostmgr/docroot/templates/warnings/mysql_version.tmpl line 2 eval {...} called at /usr/local/cpanel/whostmgr/docroot/templates/warnings/mysql_version.tmpl line 16 Template::Provider::__ANON__(Template::Context=HASH(0x688f948)) called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template/Document.pm line 163 eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template/Document.pm line 161 Template::Document::process(Template::Document=HASH(0x689ea10), Template::Context=HASH(0x688f948)) called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template/Context.pm line 347 eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template/Context.pm line 321 Template::Context::process(Template::Context=HASH(0x688f948), "warnings/mysql_version.tmpl") called at /usr/local/cpanel/whostmgr/docroot/templates/mysqlcpu.tmpl line 13 eval {...} called at /usr/local/cpanel/whostmgr/docroot/templates/mysqlcpu.tmpl line 16 Template::Provider::__ANON__(Template::Context=HASH(0x688f948)) called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template/Document.pm line 163 eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template/Document.pm line 161 Template::Document::process(Template::Document=HASH(0x6728e78), Template::Context=HASH(0x688f948)) called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template/Context.pm line 347 eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template/Context.pm line 321 Template::Context::process(Template::Context=HASH(0x688f948), Template::Document=HASH(0x6728e78)) called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template/Service.pm line 94 eval {...} called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template/Service.pm line 91 Template::Service::process(Template::Service=HASH(0x68885f0), "mysqlcpu.tmpl", HASH(0x6887b58)) called at /usr/local/cpanel/3rdparty/perl/514/lib64/perl5/cpanel_lib/x86_64-linux-64int/Template.pm line 66 Template::process(Template=HASH(0x6888278), "mysqlcpu.tmpl", HASH(0x6887b58)) called at /usr/local/cpanel/Cpanel/Template.pm line 423 Cpanel::Template::process_template("whostmgr", HASH(0x6887b58)) called at whostmgr/bin/whostmgr.pl line 3234 main::mysqlcpu called at whostmgr/bin/whostmgr.pl line 866
    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:
    # 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

    # 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?
    0
  • doropezaTSV
    Hi, I did the command /usr/local/cpanel/scripts/update_local_rpm_versions --del target_settings.MySQL55
    as recommended before. However the upcp reports errors for the upgrade at the MySQL version check like this one ...[2016-01-18 00:07:16 -0430] 59% complete [2016-01-18 00:07:16 -0430] Processing: Restoring compiler permissions [2016-01-18 00:07:16 -0430] - Processing command `/usr/local/cpanel/scripts/compilers restore` [2016-01-18 00:07:16 -0430] [26811] Compilers are disabled for unprivileged users. [2016-01-18 00:07:16 -0430] 60% complete [2016-01-18 00:07:16 -0430] Processing: Cleaning up mailbox trash [2016-01-18 00:07:16 -0430] - Processing command `/usr/local/cpanel/scripts/dovecot_auto_expunge_trash` [2016-01-18 00:07:16 -0430] 61% complete [2016-01-18 00:07:16 -0430] Checking MySQL Version => Log closed Mon Jan 18 00:07:16 2016 ---------------------------------------------------------------------------------------------------- => Log opened from cPanel Update (upcp) - Slave (24679) at Mon Jan 18 00:07:16 2016 [2016-01-18 00:07:16 -0430] E Maintenance ended, however it did not exit cleanly (7424). Please check the logs for an indication of what happened
    Also I"m getting some RPM problems [check_cpanel_rpms] There are altered RPMs on "server2.1ahost.com". The system detected problems with the following cPanel-provided files that the RPM controls: RPM Status Additional Information MySQL55-client-5.5.47-1.cp1148 Missing MySQL55-devel-5.5.47-1.cp1148 Missing MySQL55-server-5.5.47-1.cp1148 Missing MySQL55-shared-5.5.47-1.cp1148 Missing MySQL55-test-5.5.47-1.cp1148 Missing compat-MySQL50-shared-5.0.96-4.cp1136 Missing compat-MySQL51-shared-5.1.73-1.cp1150 Missing If you did not make these changes intentionally, execute the following command as the root user to correct them: /usr/local/cpanel/scripts/check_cpanel_rpms --fix This notice is the result of a request from "rpmcheck". This notice was generated "Monday, January 18, 2016 4:34:36 AM UTC". "Altered RPMs Check" notifications are currently configured to have an importance of "High". You can change the importance or disable this type of notification in WHM"s Contact Manager at:
    0
  • cPanelMichael
    I'm using Percona Server as MySQL server.

    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
    I've executed the /usr/local/cpanel/scripts/check_cpanel_rpms --fix command and I got the following results...

    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.
    0
  • doropezaTSV
    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.
    0
  • cPanelMichael
    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.

    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.
    0
  • Eric Visser
    Thank you, Michael. Will wait for fix.
    0
  • cPanelMichael
    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.
    0

Please sign in to leave a comment.