{"id":6148,"date":"2024-11-14T08:49:28","date_gmt":"2024-11-14T00:49:28","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6148\/"},"modified":"2024-11-14T08:49:28","modified_gmt":"2024-11-14T00:49:28","slug":"%e5%a6%82%e4%bd%95%e6%9f%a5%e7%9c%8bmysql%e5%90%af%e5%8a%a8%e6%97%a5%e5%bf%97","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6148\/","title":{"rendered":"\u5982\u4f55\u67e5\u770bmysql\u542f\u52a8\u65e5\u5fd7"},"content":{"rendered":"<blockquote><p>\n  \u5982\u4f55\u67e5\u770b mysql \u542f\u52a8\u65e5\u5fd7\uff1a\u786e\u5b9a\u65e5\u5fd7\u6587\u4ef6\u4f4d\u7f6e\uff1awindows\uff1ac:programdatamysqlmysql server [version]data\uff1blinux\uff1a\/var\/log\/mysql\u3002\u9009\u62e9\u5408\u9002\u65e5\u5fd7\u6587\u4ef6\uff1amysqld.log\uff08\u4e3b\u8981\u65e5\u5fd7\u6587\u4ef6\uff09\uff0cerror.log\uff08\u9519\u8bef\u548c\u8b66\u544a\uff09\u3002\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6\uff1awindows\uff1a\u8bb0\u4e8b\u672c\uff1blinux\uff1anano \u6216 vim\u3002\u65e5\u5fd7\u6587\u4ef6\u7ed3\u6784\u5305\u542b mysql \u7248\u672c\u3001\u914d\u7f6e\u3001\u52a0\u8f7d\u6a21\u5757\u3001\u5185\u5b58\u5206\u914d\u3001\u8fde\u63a5\u4fe1\u606f\u548c\u542f\u52a8\u9519\u8bef\/\u8b66\u544a\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/14\/2024061402303370351.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u67e5\u770bmysql\u542f\u52a8\u65e5\u5fd7\u63d2\u56fe\" alt=\"\u5982\u4f55\u67e5\u770bmysql\u542f\u52a8\u65e5\u5fd7\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u67e5\u770b MySQL \u542f\u52a8\u65e5\u5fd7<\/strong><\/p>\n<p>MySQL \u542f\u52a8\u65e5\u5fd7\u662f\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\uff0c\u5b83\u8bb0\u5f55\u4e86 MySQL \u670d\u52a1\u5668\u5728\u542f\u52a8\u8fc7\u7a0b\u4e2d\u52a0\u8f7d\u7684\u6a21\u5757\u3001\u914d\u7f6e\u9009\u9879\u548c\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\u3002\u67e5\u770b\u542f\u52a8\u65e5\u5fd7\u53ef\u4ee5\u5e2e\u52a9\u60a8\u8bca\u65ad\u542f\u52a8\u95ee\u9898\u6216\u4e86\u89e3\u670d\u52a1\u5668\u914d\u7f6e\u3002<\/p>\n<p><strong>\u67e5\u770b\u65e5\u5fd7\u7684\u6b65\u9aa4\uff1a<\/strong><\/p>\n<ol>\n<li>\n<p><strong>\u786e\u5b9a\u65e5\u5fd7\u6587\u4ef6\u4f4d\u7f6e\uff1a<\/strong><\/p>\n<ul>\n<li>Windows \u5e73\u53f0\uff1aC:ProgramDataMySQLMySQL Server [version]data<\/li>\n<li>Linux \u5e73\u53f0\uff1a\/var\/log\/ <\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u9009\u62e9\u5408\u9002\u7684\u65e5\u5fd7\u6587\u4ef6\uff1a<\/strong><\/p>\n<ul>\n<li> <strong>mysqld.log:<\/strong> \u4e3b\u8981\u65e5\u5fd7\u6587\u4ef6\uff0c\u8bb0\u5f55 MySQL \u670d\u52a1\u5668\u542f\u52a8\u8fc7\u7a0b\u4e2d\u7684\u6240\u6709\u4fe1\u606f\u3002<\/li>\n<li> <strong>error.log:<\/strong> \u4ec5\u8bb0\u5f55\u9519\u8bef\u548c\u8b66\u544a\u6d88\u606f\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6\uff1a<\/strong><\/p>\n<ul>\n<li>Windows \u4e0a\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u8bb0\u4e8b\u672c\u6216\u5176\u4ed6\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6\u3002<\/li>\n<li>Linux \u4e0a\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 nano \u6216 vim \u7b49\u6587\u672c\u7f16\u8f91\u5668\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><strong>\u65e5\u5fd7\u6587\u4ef6\u7ed3\u6784\uff1a<\/strong><\/p>\n<p>MySQL \u542f\u52a8\u65e5\u5fd7\u901a\u5e38\u5305\u542b\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/p>\n<ul>\n<li>MySQL \u7248\u672c\u548c\u7f16\u8bd1\u9009\u9879<\/li>\n<li>\u914d\u7f6e\u9009\u9879<\/li>\n<li>\u52a0\u8f7d\u7684\u63d2\u4ef6\u548c\u6a21\u5757<\/li>\n<li>\u5185\u5b58\u5206\u914d\u4fe1\u606f<\/li>\n<li>\u8fde\u63a5\u4fe1\u606f<\/li>\n<li>\u4efb\u4f55\u542f\u52a8\u9519\u8bef\u6216\u8b66\u544a<\/li>\n<\/ul>\n<p><strong>\u793a\u4f8b\u65e5\u5fd7\u6761\u76ee\uff1a<\/strong><\/p>\n<pre>2023-03-08T14:30:45.513190Z  0 [Note] mysqld: ready for connections.\nVersion: '8.0.30'  socket: '\/var\/run\/mysqld\/mysqld.sock'  port: 3306  MySQL Community Server - GPL.<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6b64\u65e5\u5fd7\u6761\u76ee\u6307\u793a MySQL \u670d\u52a1\u5668\u5df2\u542f\u52a8\u5e76\u5df2\u51c6\u5907\u597d\u63a5\u53d7\u8fde\u63a5\u3002\u5b83\u8fd8\u663e\u793a\u4e86 MySQL \u7248\u672c\u3001\u8fde\u63a5\u4fe1\u606f\u548c\u7aef\u53e3\u53f7\u3002<\/p>\n<p><strong>\u6545\u969c\u6392\u9664\uff1a<\/strong><\/p>\n<p>\u5982\u679c\u60a8\u5728\u542f\u52a8 MySQL \u65f6\u9047\u5230\u95ee\u9898\uff0c\u67e5\u770b\u542f\u52a8\u65e5\u5fd7\u53ef\u4ee5\u5e2e\u52a9\u60a8\u4e86\u89e3\u95ee\u9898\u7684\u539f\u56e0\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u80fd\u4f1a\u770b\u5230\u4ee5\u4e0b\u9519\u8bef\u6d88\u606f\uff1a<\/p>\n<pre>2023-03-08T14:30:45.513190Z  0 [ERROR] mysqld: Can't start server: bind on 0.0.0.0:3306 failed.<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6b64\u9519\u8bef\u8868\u660e MySQL \u65e0\u6cd5\u5728\u7aef\u53e3 3306 \u4e0a\u7ed1\u5b9a\u3002\u60a8\u9700\u8981\u68c0\u67e5\u9632\u706b\u5899\u8bbe\u7f6e\u6216\u5176\u4ed6\u8fdb\u7a0b\u662f\u5426\u6b63\u5728\u4f7f\u7528\u8be5\u7aef\u53e3\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u67e5\u770b\u542f\u52a8\u65e5\u5fd7\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>\u5982\u4f55\u67e5\u770b mysql \u542f\u52a8\u65e5\u5fd7\uff1a\u786e\u5b9a\u65e5\u5fd7\u6587\u4ef6\u4f4d\u7f6e\uff1awindows\uff1ac:programdatamysqlmysql server [version]data\uff1blinux\uff1a\/var\/log\/mysql\u3002\u9009\u62e9\u5408\u9002\u65e5\u5fd7\u6587\u4ef6\uff1amysqld.log\uff08\u4e3b\u8981\u65e5\u5fd7\u6587\u4ef6\uff09\uff0cerror.log\uff08\u9519\u8bef\u548c\u8b66\u544a\uff09\u3002\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6\uff1awindows\uff1a\u8bb0\u4e8b\u672c\uff1blinux\uff1anano \u6216 vim\u3002\u65e5\u5fd7\u6587\u4ef6\u7ed3\u6784\u5305\u542b mysql \u7248\u672c\u3001\u914d\u7f6e\u3001\u52a0\u8f7d\u6a21\u5757\u3001\u5185\u5b58\u5206\u914d\u3001\u8fde\u63a5\u4fe1\u606f\u548c\u542f\u52a8\u9519\u8bef\/\u8b66\u544a\u3002 \u5982\u4f55\u67e5\u770b MySQL \u542f\u52a8\u65e5\u5fd7 MySQL \u542f\u52a8\u65e5\u5fd7\u662f\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\uff0c\u5b83\u8bb0\u5f55\u4e86 MySQL \u670d\u52a1\u5668\u5728\u542f\u52a8\u8fc7\u7a0b\u4e2d\u52a0\u8f7d\u7684\u6a21\u5757\u3001\u914d\u7f6e\u9009\u9879\u548c\u5176\u4ed6\u76f8\u5173\u4fe1\u606f\u3002\u67e5\u770b\u542f\u52a8\u65e5\u5fd7\u53ef\u4ee5\u5e2e\u52a9\u60a8\u8bca\u65ad\u542f\u52a8\u95ee\u9898\u6216\u4e86\u89e3\u670d\u52a1\u5668\u914d\u7f6e\u3002 \u67e5\u770b\u65e5\u5fd7\u7684\u6b65\u9aa4\uff1a \u786e\u5b9a\u65e5\u5fd7\u6587\u4ef6\u4f4d\u7f6e\uff1a Windows \u5e73\u53f0\uff1aC:ProgramDataMySQLMySQL Server [version]data Linux \u5e73\u53f0\uff1a\/var\/log\/ \u9009\u62e9\u5408\u9002\u7684\u65e5\u5fd7\u6587\u4ef6\uff1a mysqld.log: \u4e3b\u8981\u65e5\u5fd7\u6587\u4ef6\uff0c\u8bb0\u5f55 MySQL \u670d\u52a1\u5668\u542f\u52a8\u8fc7\u7a0b\u4e2d\u7684\u6240\u6709\u4fe1\u606f\u3002 error.log: \u4ec5\u8bb0\u5f55\u9519\u8bef\u548c\u8b66\u544a\u6d88\u606f\u3002 \u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6\uff1a Windows \u4e0a\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u8bb0\u4e8b\u672c\u6216\u5176\u4ed6\u6587\u672c\u7f16\u8f91\u5668\u6253\u5f00\u65e5\u5fd7\u6587\u4ef6\u3002 Linux \u4e0a\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 nano \u6216 vim \u7b49\u6587\u672c\u7f16\u8f91\u5668\u3002 \u65e5\u5fd7\u6587\u4ef6\u7ed3\u6784\uff1a MySQL \u542f\u52a8\u65e5\u5fd7\u901a\u5e38\u5305\u542b\u4ee5\u4e0b\u4fe1\u606f\uff1a MySQL \u7248\u672c\u548c\u7f16\u8bd1\u9009\u9879 \u914d\u7f6e\u9009\u9879 \u52a0\u8f7d\u7684\u63d2\u4ef6\u548c\u6a21\u5757 \u5185\u5b58\u5206\u914d\u4fe1\u606f \u8fde\u63a5\u4fe1\u606f \u4efb\u4f55\u542f\u52a8\u9519\u8bef\u6216\u8b66\u544a \u793a\u4f8b\u65e5\u5fd7\u6761\u76ee\uff1a 2023-03-08T14:30:45.513190Z 0 [Note] mysqld: [&hellip;]<\/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-6148","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6148","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=6148"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6148\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}