Symptoms
Updating MariaDB to v10.2.35 or v10.3.26 may hinder select sites to be inaccessible and the MySQL Database interface within cPanel may populate "The MySQL server is currently offline."
Description
Upgrading MariaDB to v10.2.35 or v10.3.26 causes the cPanel UI to not read the grants properly. This seems to cause select sites to be inaccessible and the MySQL Database page within the cPanel interface returns the following error.
It's important to note that MariaDB should still be running, the cPanel error log should populate the string the UI is having issues reading:
[2020-11-04 07:37:27 +0000] warn [cpmysql] Error (Invalid grant string: SET DEFAULT ROLE 0 FOR '$user'@'$host'
) while parsing grant: SET DEFAULT ROLE 0 FOR '$user'@'$host' at /usr/local/cpanel/Cpanel/Mysql.pm line 956, <STDIN> line 1.
Cpanel::Mysql::__ANON__(__CPANEL_HIDDEN__...) called at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Try/Tiny.pm line 118
We've opened an internal case for our development team to investigate this further. For reference, the case number is CPANEL-34745. Follow this article to receive an email notification when a solution is published in the product.
Workaround
As of 2020-11-06, our development team has released an autofixer to address this issue. It will be run automatically the next time the nightly maintenance runs. If you are experiencing this problem now, though, you may run the following autofixer script as root:
/scripts/autorepair fix_mariadb_show_grants_roles
Note: If running the autorepair script above does not resolve your issue, please attempt restarting the SQL service.
For users that have applied the previous workaround involving downgrading MariaDB. Be sure to unlock MariaDB to ensure it continues to receive the appropriate updates:
# yum versionlock clear
Then run upcp to have the MariaDB packages updated:
/scripts/upcp