{"id":134,"date":"2019-05-09T10:42:47","date_gmt":"2019-05-09T02:42:47","guid":{"rendered":"http:\/\/www.luyouli.com\/?p=134"},"modified":"2019-05-09T10:43:26","modified_gmt":"2019-05-09T02:43:26","slug":"mysql-8-0-11-authentication-plugin-caching_sha2_password-%e5%a4%84%e7%90%86%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.luyouli.com\/?p=134","title":{"rendered":"Mysql 8.0.11 Authentication plugin &#8216;caching_sha2_password&#8217; \u5904\u7406\u65b9\u6cd5"},"content":{"rendered":"\n<p> \u65b0\u88c5\u7684mysql 8.0.11\uff0c\u7528mydumper\u8fde\u63a5\u53d1\u73b0\u8fde\u63a5\u4e0d\u4e0a\uff0c\u603b\u662f\u62a5\u9519\uff1a<\/p>\n\n\n\n<p>Error connecting to database: Authentication plugin &#8216;caching_sha2_password&#8217; cannot be loaded: \n<p><!--more--><\/p>\n\/usr\/lib64\/mysql\/plugin\/caching_sha2_password.so: cannot open shared object file: No such file or directory <\/p>\n\n\n\n<p> \u8fdb\u5230\u6570\u636e\u5e93\u91cc\u9762\u67e5\u770b\u4fe1\u606f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql&gt; use mysql;\nDatabase changed\nmysql&gt; select user, host, plugin, authentication_string from user \\G\n*************************** 1. row ***************************\n                 user: mysql.infoschema\n                 host: localhost\n               plugin: mysql_native_password\nauthentication_string: *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE\n*************************** 2. row ***************************\n                 user: mysql.session\n                 host: localhost\n               plugin: mysql_native_password\nauthentication_string: *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE\n*************************** 3. row ***************************\n                 user: mysql.sys\n                 host: localhost\n               plugin: mysql_native_password\nauthentication_string: *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE\n*************************** 4. row ***************************\n                 user: root\n                 host: localhost\n               plugin: caching_sha2_password\nauthentication_string: \n4 rows in set (0.03 sec) <\/pre>\n\n\n\n<p>\u53d1\u73b0\u662f\u56e0\u4e3a&#8221;caching_sha2_password&#8221;\u7684\u95ee\u9898\uff0c\u53ea\u8981\u6539\u56de&#8221;mysql_native_password&#8221;\u5c31\u53ef\u4ee5\u4e86<\/p>\n\n\n\n<p>\u4fee\u6539\u7b2c\u4e00\u6b65\uff1a<\/p>\n\n\n\n<p>mysql&gt; ALTER USER &#8216;root&#8217;@&#8217;localhost&#8217; IDENTIFIED WITH mysql_native_password BY &#8216;root&#8217;; <\/p>\n\n\n\n<p>\u4fee\u6539\u7b2c\u4e8c\u6b65\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5728my.cnf\u914d\u7f6e\u6587\u4ef6\u4e2d[mysqld]\u5185\u8bbe\u7f6e\u9ed8\u8ba4\u4e3a\"mysql_native_password\"\n# vim \/etc\/my.cnf\n[mysqld]\ndefault_authentication_plugin=mysql_native_password<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u88c5\u7684mysql 8.0.11\uff0c\u7528mydumper\u8fde\u63a5\u53d1\u73b0\u8fde\u63a5\u4e0d\u4e0a\uff0c\u603b\u662f\u62a5\u9519\uff1a Error connectin [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-134","post","type-post","status-publish","format-standard","hentry","category-mysql"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"views":5949,"_links":{"self":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=134"}],"version-history":[{"count":3,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/134\/revisions"}],"predecessor-version":[{"id":137,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/134\/revisions\/137"}],"wp:attachment":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}