{"id":84,"date":"2021-11-22T22:44:00","date_gmt":"2021-11-22T22:44:00","guid":{"rendered":"https:\/\/www.meblg.com\/?p=84"},"modified":"2022-02-11T10:51:55","modified_gmt":"2022-02-11T02:51:55","slug":"mysdok","status":"publish","type":"post","link":"https:\/\/www.meblg.com\/index.php\/jc\/mysdok\/","title":{"rendered":"mysql docker\u8bbe\u7f6eroot\u8fdc\u7a0b\u767b\u5f55"},"content":{"rendered":"<p>\u8fdb\u5165\u5bb9\u5668\u8f93\u5165:<\/p>\n<pre><code>cd \/etc\/mysql\nvi my.cnf\n<\/code><\/pre>\n<p>\u5728\u7ed3\u5c3e\u6dfb\u52a0:<\/p>\n<pre><code>skip-grant-tables\n<\/code><\/pre>\n<p>\u4fdd\u5b58\u9000\u51fa\u3002<br \/>\n\u91cd\u542f\u8fdb\u5165\u5bb9\u5668\u8f93\u5165<code>mysql<\/code>\uff0c\u7136\u540e\u518d\u5237\u65b0\u4e00\u4e0b\u6743\u9650<\/p>\n<pre><code>flush privileges;\n<\/code><\/pre>\n<p>\u63a5\u7740\u4f9d\u6b21\uff1a<\/p>\n<pre><code>use mysql;\nselect host, user, authentication_string, plugin from user;\nupdate user set host='%' where user='root';\nFLUSH PRIVILEGES;<\/code><\/pre>\n<p>\u8fdc\u7a0b\u767b\u5f55\u5c31\u5b8c\u6210\u4e86\uff0c\u7528Navicat\u4e4b\u7c7b\u7684\u5de5\u5177\u8fd8\u9700\u8981\u6539\u4e0b\u52a0\u5bc6\u89c4\u5219\u3002<\/p>\n<blockquote><p>MySQL8.0\u4e4b\u524d\u7684\u7248\u672c\u5bc6\u7801\u52a0\u5bc6\u89c4\u5219\uff1amysql_native_password<br \/>\nMySQL8.0\u5bc6\u7801\u52a0\u5bc6\u89c4\u5219\uff1acaching_sha2_password<\/p><\/blockquote>\n<p>\u8f93\u5165\uff1a<\/p>\n<pre><code>ALTER USER 'root'@'localhost' IDENTIFIED BY '\u5bc6\u7801' PASSWORD EXPIRE NEVER;\nALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '\u5bc6\u7801';\nALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '\u5bc6\u7801';\n<\/code><\/pre>\n<p>\u5982\u679c\u62a5<strong>ERROR 1290 (HY000): The MySQL server is running with the &#8211;skip-grant-tables<\/strong>\u9519\u8bef\u5c31\u5148\u8f93\u5165\uff1a <strong>flush privileges;<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fdb\u5165\u5bb9\u5668\u8f93\u5165: cd \/etc\/mysql vi my.cnf \u5728\u7ed3\u5c3e\u6dfb\u52a0: skip-grant-table [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[41,40],"topics":[],"class_list":["post-84","post","type-post","status-publish","format-standard","hentry","category-jc","tag-docker","tag-mysql"],"_links":{"self":[{"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/posts\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":1,"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":95,"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/posts\/84\/revisions\/95"}],"wp:attachment":[{"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/tags?post=84"},{"taxonomy":"topics","embeddable":true,"href":"https:\/\/www.meblg.com\/index.php\/wp-json\/wp\/v2\/topics?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}