{"id":831,"date":"2017-07-29T13:33:32","date_gmt":"2017-07-29T05:33:32","guid":{"rendered":"http:\/\/www.5x44.cn\/?p=831"},"modified":"2020-04-30T09:00:41","modified_gmt":"2020-04-30T01:00:41","slug":"%e4%b8%8d%e8%83%bd%e9%93%be%e6%8e%a5%e6%95%b0%e6%8d%ae%e5%ba%93","status":"publish","type":"post","link":"https:\/\/www.5x44.cn\/?p=831","title":{"rendered":"\u4e0d\u80fd\u94fe\u63a5\u6570\u636e\u5e93"},"content":{"rendered":"<p>\u9898\u4e00\uff1a<br \/>192.168.1.50\u662fMYSQL\u6240\u5728\u7684\u670d\u52a1\u5668IP<br \/>ERROR 2003 (HY000): Can&#8217;t connect to MySQL server on &#8216;192.168.1.50&#8217; (111)<br \/>\u5982\u4f55\u89e3\u51b3\uff1f<br \/>\u65b9\u6cd5\u5982\u4e0b\uff1a<br \/>\uff081\uff09\u68c0\u67e5\u670d\u52a1\u662f\u5426\u542f\u52a8<br \/>\uff082\uff09\u7ed1\u5b9aIP\u662f\u4ec0\u4e48\uff1f\u9ed8\u8ba4\u662f127.0.0.1\uff0c\u5982\u679c\u662f\u8fd9\u4e2aIP\u90a3\u4e48\u53ea\u80fd\u672c\u5730\u767b\u5f55\uff0c\u8981\u5728my.cnf\u4e2d\u4fee\u6539bind_address\u4e3a0.0.0.0\uff0c\u8fd9\u6837\u5c31\u662f\u6240\u6709IP\u90fd\u53ef\u4ee5\u767b\u5f55\uff08\u867d\u7136\u8fd9\u6837\u6709\u5b89\u5168\u9690\u60a3\uff0c\u4f46MYSQL\u4e0d\u652f\u6301\u7ed1\u5b9a\u591a\u4e2aIP\u5730\u5740\uff0c\u4e4b\u540e\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539\u9632\u706b\u5899\u7684\u65b9\u5f0f\u963b\u6b62\u5176\u5b83IP\u767b\u5f55\uff09<br \/>\uff083\uff09\u6388\u6743\u76f8\u5173\u7528\u4e8e\u5728\u67d0\u4e00IP\u767b\u5f55\uff1a<br \/><code><br \/>\ncreate user username@XXX.XXX.XXX.XXX;<br \/>\ngrant select on dbname.tablename to username@XXX.XXX.XXX.XXX identified by 'PASSWORD'<br \/>\n<\/code><br \/>\u4e0a\u9762\u53ea\u6388\u6743\u4e86select\u6743\u9650\uff0c\u6240\u6709\u6743\u9650\u662fall privileges\u3002<\/p>\n<p>\u9898\u4e8c\uff1a<\/p>\n<p>ERROR 1045 (28000): Access denied for user &#8216;root&#8217;@&#8217;192.168.1.99&#8217; (using password: YES)<\/p>\n<p>\u5982\u4f55\u89e3\u51b3\uff1f<\/p>\n<p>\u5bc6\u7801\u9519\u6216\u8005\u670d\u52a1\u5668IP\u5730\u5740\u6709\u9519<\/p>\n<p>\u9898\u4e09\uff1a ERROR 1698 (28000): Access denied for user &#8216;root&#8217;@&#8217;localhost&#8217; <\/p>\n<p>\u67e5\u770b\u4e00\u4e0buser\u8868\uff0c\u9519\u8bef\u7684\u8d77\u56e0\u5c31\u662f\u5728\u8fd9\u91cc\uff0c root\u7684plugin\u88ab\u4fee\u6539\u6210\u4e86auth_socket\uff0c\u7528\u5bc6\u7801\u767b\u9646\u7684plugin\u5e94\u8be5\u662fmysql_native_password\u3002<\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9898\u4e00\uff1a192.168.1.50\u662fMYSQL\u6240\u5728\u7684\u670d\u52a1\u5668IPERROR 2003 (HY000): Can&#8217;t connect to MySQL se&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.5x44.cn\/?p=831\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":["post-831","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts\/831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=831"}],"version-history":[{"count":4,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts\/831\/revisions"}],"predecessor-version":[{"id":7264,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts\/831\/revisions\/7264"}],"wp:attachment":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}