{"id":6968,"date":"2024-11-14T15:09:59","date_gmt":"2024-11-14T07:09:59","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6968\/"},"modified":"2024-11-14T15:09:59","modified_gmt":"2024-11-14T07:09:59","slug":"linux%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a-mysql-%e7%99%bb%e5%bd%95%e6%8a%a5%e9%94%99%ef%bc%8c%e5%a6%82%e4%bd%95%e6%8e%92%e6%9f%a5%e9%97%ae%e9%a2%98%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6968\/","title":{"rendered":"Linux\u670d\u52a1\u5668\u4e0a MySQL \u767b\u5f55\u62a5\u9519\uff0c\u5982\u4f55\u6392\u67e5\u95ee\u9898\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173019870931085.jpg\" class=\"aligncenter\" title=\"Linux\u670d\u52a1\u5668\u4e0a MySQL \u767b\u5f55\u62a5\u9519\uff0c\u5982\u4f55\u6392\u67e5\u95ee\u9898\uff1f\u63d2\u56fe\" alt=\"Linux\u670d\u52a1\u5668\u4e0a MySQL \u767b\u5f55\u62a5\u9519\uff0c\u5982\u4f55\u6392\u67e5\u95ee\u9898\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u767b\u5f55\u62a5\u9519<\/strong><\/p>\n<p>\u5728Linux\u670d\u52a1\u5668\u4e0a\u6267\u884cmysql -uroot -p123456\u767b\u5f55MySQL\u65f6\u9047\u5230\u9519\u8bef\uff0c\u8be2\u95ee\u539f\u56e0\u3002<\/p>\n<p><strong>\u95ee\u9898\u89e3\u7b54<\/strong><\/p>\n<p>\u5bfc\u81f4\u6b64\u9519\u8bef\u7684\u539f\u56e0\u53ef\u80fd\u662fMySQL\u914d\u7f6e\u6587\u4ef6my.cnf\u7684\u914d\u7f6e\u4e0d\u5f53\u3002\u8be5\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e\/etc\/my.cnf\u6216\/etc\/mysql\/my.cnf\u3002<\/p>\n<p>\u5efa\u8bae\u68c0\u67e5\u4ee5\u4e0b\u914d\u7f6e\u9879\uff1a<\/p>\n<ul>\n<li> <strong>bind-address<\/strong>\uff1a\u786e\u4fdd\u6b64\u9009\u9879\u8bbe\u7f6e\u4e3a\u670d\u52a1\u5668\u7684IP\u5730\u5740\uff0c\u800c\u4e0d\u662flocalhost\u3002<\/li>\n<li> <strong>port<\/strong>\uff1a\u9a8c\u8bc1\u7aef\u53e3\u53f7\u662f\u5426\u6b63\u786e\uff08\u9ed8\u8ba4\u4e3a3306\uff09\u3002<\/li>\n<li> <strong>password<\/strong>\uff1a\u786e\u8ba4\u63d0\u4f9b\u7684\u5bc6\u7801\u4e0e\u7528\u6237\u5173\u8054\u7684\u5bc6\u7801\u76f8\u540c\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u4e0a\u8ff0\u914d\u7f6e\u6b63\u786e\uff0c\u5219\u53ef\u80fd\u5b58\u5728\u5176\u4ed6\u95ee\u9898\uff0c\u4f8b\u5982\uff1a<\/p>\n<ul>\n<li>MySQL\u670d\u52a1\u672a\u542f\u52a8<\/li>\n<li>\u9632\u706b\u5899\u963b\u6b62\u4e86\u8fde\u63a5<\/li>\n<li>root\u7528\u6237\u5bc6\u7801\u9519\u8bef<\/li>\n<\/ul>\n<p>\u68c0\u67e5my.cnf\u914d\u7f6e\u5e76\u89e3\u51b3\u4efb\u4f55\u4e0d\u4e00\u81f4\u4e4b\u5904\u540e\uff0c\u5c1d\u8bd5\u91cd\u65b0\u767b\u5f55MySQL\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fLinux\u670d\u52a1\u5668\u4e0a MySQL \u767b\u5f55\u62a5\u9519\uff0c\u5982\u4f55\u6392\u67e5\u95ee\u9898\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u767b\u5f55\u62a5\u9519 \u5728Linux\u670d\u52a1\u5668\u4e0a\u6267\u884cmysql -uroot -p123456\u767b\u5f55MySQL\u65f6\u9047\u5230\u9519\u8bef\uff0c\u8be2\u95ee\u539f\u56e0\u3002 \u95ee\u9898\u89e3\u7b54 \u5bfc\u81f4\u6b64\u9519\u8bef\u7684\u539f\u56e0\u53ef\u80fd\u662fMySQL\u914d\u7f6e\u6587\u4ef6my.cnf\u7684\u914d\u7f6e\u4e0d\u5f53\u3002\u8be5\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e\/etc\/my.cnf\u6216\/etc\/mysql\/my.cnf\u3002 \u5efa\u8bae\u68c0\u67e5\u4ee5\u4e0b\u914d\u7f6e\u9879\uff1a bind-address\uff1a\u786e\u4fdd\u6b64\u9009\u9879\u8bbe\u7f6e\u4e3a\u670d\u52a1\u5668\u7684IP\u5730\u5740\uff0c\u800c\u4e0d\u662flocalhost\u3002 port\uff1a\u9a8c\u8bc1\u7aef\u53e3\u53f7\u662f\u5426\u6b63\u786e\uff08\u9ed8\u8ba4\u4e3a3306\uff09\u3002 password\uff1a\u786e\u8ba4\u63d0\u4f9b\u7684\u5bc6\u7801\u4e0e\u7528\u6237\u5173\u8054\u7684\u5bc6\u7801\u76f8\u540c\u3002 \u5982\u679c\u4e0a\u8ff0\u914d\u7f6e\u6b63\u786e\uff0c\u5219\u53ef\u80fd\u5b58\u5728\u5176\u4ed6\u95ee\u9898\uff0c\u4f8b\u5982\uff1a MySQL\u670d\u52a1\u672a\u542f\u52a8 \u9632\u706b\u5899\u963b\u6b62\u4e86\u8fde\u63a5 root\u7528\u6237\u5bc6\u7801\u9519\u8bef \u68c0\u67e5my.cnf\u914d\u7f6e\u5e76\u89e3\u51b3\u4efb\u4f55\u4e0d\u4e00\u81f4\u4e4b\u5904\u540e\uff0c\u5c1d\u8bd5\u91cd\u65b0\u767b\u5f55MySQL\u3002 \u4ee5\u4e0a\u5c31\u662fLinux\u670d\u52a1\u5668\u4e0a MySQL \u767b\u5f55\u62a5\u9519\uff0c\u5982\u4f55\u6392\u67e5\u95ee\u9898\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-6968","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=6968"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6968\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}