MariaDB MYSQL Invalid Grant String Set Default Role 0


When accessing cPanel >> MySQL Databases you receive an error with the following:

The MySQL server is currently offline.
adminbin Cpanel/cpmysql/DBCACHE: exit 255"


Whenever there is an issue with the cPanel interface, the most helpful thing you can do is check the cPanel logs at the following file:


Checking that error log file will likely give you more details on the problem, and that may even be enough to resolve the issue.


In this case, I found the following entry in the cPanel error log while loading the cPanel >> MySQL Databases page:

Cpanel::Exception::Database::CpuserNotInMap/(XID xfttxq) The cPanel user “username” does not exist in the database map.

When this happens that indicates there is an issue with the MySQL system, but fortunately there is a cPanel tool to get this taken care of.  You can run the following command to update the user’s database map on the machine:

/scripts/rebuild_dbmap $user

and that will get things working properly. 

NOTE: You will want to be sure to replace $user with the affect cPanel account’s username.

Error It May Generate:

Transfers or restores will show errors similar to below:

The "Mysql" restore module failed because of an error: Invalid grant string: SET DEFAULT ROLE 0 FOR 'testuser'@''

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. 


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:

  • mysql, mariadb invalid grant string
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Setting up a Linux Streaming Server

Linux, streaming server Linux, allows you to stream video, audio or other media on your website....

How to Install LiteSpeed on a WHM/cPanel Server

Here’s how you install LiteSpeed on a WHM/cPanel Server – it should take about 25minutes from...

Change the default SSH port

The Secure Shell (SSH) Protocol by default uses port 22. Accepting this value does not make your...

Using VI Text Editor

Text editors are programs used to create or edit files. One of the most popular editors on...

Reset a MySQL root password

So you've managed to misplace your root login for a MySQL database? Not to worry, the following...