sales@nixtree.com

MariaDB Upgrade breaks the cpanel mysql interface

MariaDB Upgrade breaks the cpanel mysql interface

The mariadb upgrade breaks the cpanel mysql interface as a part of the cpanel update. Find the solutions for resolving the issue with your cPanel servers.

Issue

cPanel MySQL database interface breaks when MariaDB is upgraded from version MariaDB 10.3.22 to 10.3.23.

cPanel -> MySQL Databases interface. This MariaDB update occurs automatically when updating cPanel with a version that includes support for MariaDB 10.3.

Symptoms

The cPanel -> MySQL Databases interface will display these errors:

“The MySQL server is currently offline.”

“Error encountered while fetching data: There is no such grant defined for user ‘cpses_username’ on host ‘localhost’ DBDISKUSED cpuser_user 0 DISKUSED 0 DB cpuser_user USER cpuser_db”


The following errors can also be found in cPanel’s error log:

[2020-05-12 23:36:14 -0500] warn [cpmysql] Error encountered while fetching data: There is no such grant defined for user 'cpses_username' on host 'localhost' at /usr/local/cpanel/Cpanel/DBAdmin.pm line 186, <STDIN> line 1.

[2020-05-12 23:36:14 -0500] warn [cpanel] Cpanel::Wrap::send_cpwrapd_request adminbin Cpanel/cpmysql/DBCACHE: exit 11: namespace=[Cpanel] module=[cpmysql] function=[DBCACHE]: set error in context mysql: raw_response=[{"version":"2.4","action":"run","data":"Error encountered while fetching data: There is no such grant defined for user 'cpses_username' on host 'localhost'\nDBDISKUSED\tcptech_dbv\t0\nDISKUSED\t0\nDB\tcptech_dbv\nUSER\tcptech_db\n","timeout":0,"mode":"simple","status":1,"exit_code":2816,"error":1,"statusmsg":"adminbin Cpanel/cpmysql/DBCACHE: exit 11"}] at /usr/local/cpanel/Cpanel/Wrap.pm line 120, <$socket> line 1.

Solution 1

As of now, cPanel is working for a permanent fix for this bug in version 86. cPanel does not recommend downgrading the MySQL version as it includes several important CVE fixes. The recommended solution is to move to version 88(which is the currrent version) as it is not affected by this bug.

Solution 2

One of the solution suggested by cpanel forums ( not by official support ) is to downgrade the MariaDB packages. Since this is an official fix we were suggest taking backup of the mysql databases before performing this fix.

First check the installed packages using the following command.

rpm -qa | grep MariaDB

Downgrade the MariaDB packages using the following yum command.

yum downgrade MariaDB-server MariaDB-common MariaDB-shared MariaDB-client MariaDB-compat MariaDB-devel

If your server has not yet been affected by the issue, we recommend yum-locking the MariaDB packages in place to avoid the package from being updated. This can be completed by executing the following:

# yum install -y yum-plugin-versionlock && yum versionlock MariaDB-* && yum versionlock list

NOTE: The above change should be reverted once the issue has been patched, not doing so may lead to MariaDB being unable to receive vital security updates in the future. To revert the above changes, the following can be executed:

As of now, cPanel is working for a permanent fix for this bug in version 86. cPanel does not recommend downgrading the MySQL version as it includes several important CVE fixes. The recommended solution is to move to version 88(which is the currrent version) as it is not affected by this bug.

Conclusion

cPanel support team suggested to update cpanel to currrent version than downgrading the mariadb. We tested the mariadb downgrade and it worked fine in our servers. Make sure to perform this with the help of an experienced linux administrator to avoid breaking the mysql databases. If you need assistance is fixing the issue, you can check our cPanel Server management plans or Hourly Server management plan for one time support.

Facebook Comments