{"id":1011,"date":"2020-07-13T13:11:20","date_gmt":"2020-07-13T04:11:20","guid":{"rendered":"https:\/\/www.jaga.biz\/?p=1011"},"modified":"2020-07-13T13:11:21","modified_gmt":"2020-07-13T04:11:21","slug":"error-mysql-infoschema","status":"publish","type":"post","link":"https:\/\/www.jaga.biz\/en\/mysql\/error-mysql-infoschema\/","title":{"rendered":"Solution for &#8220;the user specified as a definer (&#8216;mysql.infoschema&#8217;@&#8217;localhost&#8217;) does not exist&#8221;"},"content":{"rendered":"\n\n\n<h2 class=\"wp-block-heading\">Error occurrence<\/h2>\n\n\n\n<p>When I upgraded mysqld by yum update, then the following error came to be displayed when executing &#8220;show databases&#8221; .<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">the user specified as a definer ('mysql.infoschema'@'localhost') does not exist<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Survey<\/h2>\n\n\n\n<p>I entered the mysql console as a root user and ran the following command<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">select User, plugin, authentication_string from mysql.user where user like 'mysql.%';<\/pre>\n\n\n\n<p>The results were as follows.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">+------------------+-----------------------+------------------------------------------------------------------------+\n| User             | plugin                | authentication_string                                                  |\n+------------------+-----------------------+------------------------------------------------------------------------+\n| mysql.infoschema | mysql_native_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |\n| mysql.session    | mysql_native_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |\n| mysql.sys        | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |\n+------------------+-----------------------+------------------------------------------------------------------------+<\/pre>\n\n\n\n<p>authentication_string stores a hash of the password, but the format &#8220;$A$005&#8230;&#8221; seems to be generated when using caching_sha2_password_sha2_password for encryption.<br \/>mysql.infoschema and mysql.session are encrypted with &#8220;mysql_ native_password&#8221; is used but &#8220;$A$005&#8230;&#8221; is set.<br \/>This is strange.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<p>This may seem a bit aggressive, but I ran the following SQL to make sure that the password encryption method matches the hash format.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">update mysql.user set plugin = 'caching_sha2_password' where User = 'mysql.infoschema'\nupdate mysql.user set plugin = 'caching_sha2_password' where User = 'mysql.session'<\/pre>\n\n\n\n<p>After that, check the contents of mysql.user again in the aforementioned SQL. The contents should look like the following.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">+------------------+-----------------------+------------------------------------------------------------------------+\n| User             | plugin                | authentication_string                                                  |\n+------------------+-----------------------+------------------------------------------------------------------------+\n| mysql.infoschema | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |\n| mysql.session    | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |\n| mysql.sys        | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED |\n+------------------+-----------------------+------------------------------------------------------------------------+<\/pre>\n\n\n\n<p>After this, I restarted mysqld and executed &#8220;show databases&#8221; without any problems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Error occurrence When I upgraded mysqld by yum update, then the following error came to be displayed when exec\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.jaga.biz\/en\/mysql\/error-mysql-infoschema\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_locale":"en_US","_original_post":"http:\/\/www.jaga.biz\/?p=1007","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[15],"tags":[],"class_list":["post-1011","post","type-post","status-publish","format-standard","hentry","category-mysql","en-US"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jaga.biz\/wp-json\/wp\/v2\/posts\/1011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jaga.biz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jaga.biz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jaga.biz\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jaga.biz\/wp-json\/wp\/v2\/comments?post=1011"}],"version-history":[{"count":1,"href":"https:\/\/www.jaga.biz\/wp-json\/wp\/v2\/posts\/1011\/revisions"}],"predecessor-version":[{"id":1012,"href":"https:\/\/www.jaga.biz\/wp-json\/wp\/v2\/posts\/1011\/revisions\/1012"}],"wp:attachment":[{"href":"https:\/\/www.jaga.biz\/wp-json\/wp\/v2\/media?parent=1011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jaga.biz\/wp-json\/wp\/v2\/categories?post=1011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jaga.biz\/wp-json\/wp\/v2\/tags?post=1011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}