{"id":14447,"date":"2020-12-29T18:15:25","date_gmt":"2020-12-29T18:15:25","guid":{"rendered":"https:\/\/www.shineservers.com\/?p=3230"},"modified":"2020-12-29T18:15:25","modified_gmt":"2020-12-29T18:15:25","slug":"mariadb-mysql-invalid-grant-string-set-default-role-0-for","status":"publish","type":"post","link":"https:\/\/www.shineservers.com\/2020\/12\/29\/mariadb-mysql-invalid-grant-string-set-default-role-0-for\/","title":{"rendered":"MariaDB\/MySQL \u2026Invalid grant string: SET DEFAULT ROLE 0 FOR"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Symptoms<\/h2>\n\n\n\n<p>When accessing cPanel &gt;&gt; MySQL Databases you receive an error with the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">The MySQL server is currently offline.<br>adminbin Cpanel\/cpmysql\/DBCACHE: exit 255\"<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Description&nbsp;<\/h2>\n\n\n\n<p>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:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/usr\/local\/cpanel\/logs\/error_log<\/pre>\n\n\n\n<p>Checking that error log file will likely give you more details on the problem, and that may even be enough to resolve the issue.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Workaround<\/h2>\n\n\n\n<p>In this case, I found the following entry in the cPanel error log while loading the cPanel &gt;&gt; MySQL Databases page:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Cpanel::Exception::Database::CpuserNotInMap\/(XID xfttxq) The cPanel user \u201cusername\u201d does not exist in the database map.<\/pre>\n\n\n\n<p>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.&nbsp; You can run the following command to update the user&#8217;s database map on the machine:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/scripts\/rebuild_dbmap $user<\/pre>\n\n\n\n<p>and that will get things working properly.&nbsp;<\/p>\n\n\n\n<p>NOTE: You will want to be sure to replace $user with the affect cPanel account&#8217;s username.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Error It May Generate:<\/h2>\n\n\n\n<p>Transfers or restores will show errors similar to below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">The \"Mysql\" restore module failed because of an error: Invalid grant string: SET DEFAULT ROLE 0 FOR 'testuser'@'10.1.1.3'<\/pre>\n\n\n\n<p>We&#8217;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.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Workaround<\/h2>\n\n\n\n<p>As of 2020-11-06, our development team has released an autofixer to address this issue.&nbsp; It will be run automatically the next time the nightly maintenance runs.&nbsp; If you are experiencing this problem now, though, you may run the following autofixer script as root:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/scripts\/autorepair fix_mariadb_show_grants_roles<\/pre>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;If running the autorepair script above does not resolve your issue, please attempt restarting the SQL service.<\/p>\n\n\n\n<p><strong>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:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># yum versionlock clear<\/pre>\n\n\n\n<p>Then run upcp to have the MariaDB packages updated:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/scripts\/upcp<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Symptoms When accessing cPanel &gt;&gt; MySQL Databases you receive an error with the following: The MySQL server is currently offline.adminbin Cpanel\/cpmysql\/DBCACHE: exit 255&#8243; Description&nbsp; 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: \/usr\/local\/cpanel\/logs\/error_log Checking that error log file [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":13367,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[200],"tags":[],"class_list":["post-14447","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql-2"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/14447","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/comments?post=14447"}],"version-history":[{"count":0,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/14447\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/media?parent=14447"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/categories?post=14447"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/tags?post=14447"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}