{"id":543,"date":"2025-07-30T16:06:42","date_gmt":"2025-07-30T08:06:42","guid":{"rendered":"https:\/\/blog.lcsoul.cn\/?p=543"},"modified":"2025-07-30T16:06:42","modified_gmt":"2025-07-30T08:06:42","slug":"%e5%ae%9d%e5%a1%94%e9%9d%a2%e7%89%88-docker%e8%ae%bf%e9%97%ae%e9%9d%a2%e6%9d%bf%e6%95%b0%e6%8d%ae%e5%ba%93-%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae%e6%95%b0%e6%8d%ae%e5%ba%93","status":"publish","type":"post","link":"https:\/\/blog.lcsoul.top\/index.php\/2025\/07\/30\/%e5%ae%9d%e5%a1%94%e9%9d%a2%e7%89%88-docker%e8%ae%bf%e9%97%ae%e9%9d%a2%e6%9d%bf%e6%95%b0%e6%8d%ae%e5%ba%93-%e8%bf%9c%e7%a8%8b%e8%ae%bf%e9%97%ae%e6%95%b0%e6%8d%ae%e5%ba%93\/","title":{"rendered":"\u5b9d\u5854\u9762\u7248 docker\u8bbf\u95ee\u9762\u677f\u6570\u636e\u5e93 \u8fdc\u7a0b\u8bbf\u95ee\u6570\u636e\u5e93"},"content":{"rendered":"<h4>\u8fdb\u5165mysql\uff1a<\/h4>\n<pre class=\"corepress-code-pre\"><code>mysql -uroot -p<\/code><\/pre>\n<h4><\/h4>\n<h4>\u4f7f\u7528mysql\u5e93\uff1a<\/h4>\n<pre class=\"corepress-code-pre\"><code>use mysql;<\/code><\/pre>\n<h4><\/h4>\n<h4>\u67e5\u770b\u7528\u6237\u8868\uff1a<\/h4>\n<pre class=\"corepress-code-pre\"><code>SELECT `Host`,`User` FROM user;<\/code><\/pre>\n<h4>\u66f4\u65b0\u7528\u6237\u8868\uff1a\uff08\u5176\u4e2d%\u7684\u610f\u601d\u662f\u5141\u8bb8\u6240\u6709\u7684ip\u8fdc\u7a0b\u8bbf\u95ee\uff09<\/h4>\n<pre class=\"corepress-code-pre\"><code>UPDATE user SET `Host` = '%' WHERE `User` = 'root' LIMIT 1;\n<\/code><\/pre>\n<h4><\/h4>\n<h4>\u5f3a\u5236\u5237\u65b0\u6743\u9650\uff1a<\/h4>\n<pre class=\"corepress-code-pre\"><code>flush privileges;<\/code><\/pre>\n<h4><\/h4>\n<h4><\/h4>\n<h4>\u5982\u679c\u9047\u5230<\/h4>\n<p><code>ERROR 2002 (HY000): Can't connect to local server through socket '\/run\/mysqld\/mysqld.sock' (2)<\/code><\/p>\n<h4><\/h4>\n<h4>\u53ef\u4ee5\u4f7f\u7528 TCP \u8fde\u63a5\u4ee3\u66ff socket\uff08\u4e34\u65f6\u7ed5\u8fc7\uff09<\/h4>\n<pre class=\"corepress-code-pre\"><code>mysql -uroot -p -h 127.0.0.1<\/code><\/pre>\n<h4><\/h4>\n","protected":false},"excerpt":{"rendered":"<p>\u8fdb\u5165mysql\uff1a mysql -uroot -p \u4f7f\u7528mysql\u5e93\uff1a use mysql; \u67e5\u770b\u7528\u6237\u8868\uff1a SE [&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-543","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts\/543","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/comments?post=543"}],"version-history":[{"count":0,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/posts\/543\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/media?parent=543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/categories?post=543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.lcsoul.top\/index.php\/wp-json\/wp\/v2\/tags?post=543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}