How the MariaDB upgrade breaks the cPanel MYSQL interface.

How the MariaDB upgrade breaks the cPanel MYSQL interface.

As part of the cPanel update, the MariaDB upgrade breaks the MySQL interface in cPanel. Find solutions to your cPanel server problems.

It Occurs automatically when you update cPanel with a version that includes and supports MariaDB 10.3

Your MYSQL Database interface will display 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”

You can find the following errors from 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

cPanel is working on a permanent fix for this bug in version 86. Downgrading MySQL is not recommended by cPanel since it contains multiple key CVE fixes. The best remedy is to upgrade to version 88 (the most recent version), which is unaffected by this fault.

Solution 2

First, you need to check the installed packages using the command

rpm -qa | grep MariaDB

Now, 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 hasn’t been hit yet by the bug, we propose yum-locking the MariaDB packages to prevent them from being upgraded. This can be done by doing the following steps:

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

Remember: Once the vulnerability has been fixed, the above change should be restored; otherwise, MariaDB may be unable to receive critical security upgrades in the future. The following commands can be used to undo the changes made above:

# yum versionlock clear

Currently, cPanel is working on a permanent fix for the version 86 problem. Downgrading MySQL is not recommended by cPanel since it contains multiple key CVE fixes. The best remedy is to upgrade to version 88 (the most recent version), which is unaffected by this fault.

Conclusion

The cPanel support team recommended that instead of downgrading MariaDB, you should update cPanel to the latest version. We tested the MariaDB downgrade on our servers and it worked perfectly. To avoid breaking the MySQL databases, do this with the support of an expert Linux administrator. You can check out our cPanel Server administration plans or Hourly Server management plans for one-time support if you need help fixing the problem.

Follow us on FacebookTwitter, and LinkedIn for additional information.


Get your free trial now