{"id":6429,"date":"2024-11-14T14:58:05","date_gmt":"2024-11-14T06:58:05","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6429\/"},"modified":"2024-11-14T14:58:05","modified_gmt":"2024-11-14T06:58:05","slug":"mysql%e7%9a%84%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%e5%9c%a8%e5%93%aa","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6429\/","title":{"rendered":"mysql\u7684\u914d\u7f6e\u6587\u4ef6\u5728\u54ea"},"content":{"rendered":"<blockquote><p>\n  mysql \u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e\uff1alinux\/macos\uff1a\/etc\/mysql\/my.cnf\u3001\/etc\/my.cnf\u3001\/usr\/local\/etc\/my.cnfwindows\uff1ac:programdatamysqlmysql server x.ymy.ini\u5176\u4ed6\u4f4d\u7f6e\uff1a\u5b89\u88c5\u76ee\u5f55\u4e0b\u7684 my.cnf \u6587\u4ef6\u6216\u901a\u8fc7 &#8211;defaults-file \u9009\u9879\u6307\u5b9a\u7684\u81ea\u5b9a\u4e49\u4f4d\u7f6e\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/02\/2024080207521081778.jpg\" class=\"aligncenter\" title=\"mysql\u7684\u914d\u7f6e\u6587\u4ef6\u5728\u54ea\u63d2\u56fe\" alt=\"mysql\u7684\u914d\u7f6e\u6587\u4ef6\u5728\u54ea\u63d2\u56fe\" \/><\/p>\n<p><strong>MySQL \u914d\u7f6e\u6587\u4ef6\u7684\u6240\u5728\u4f4d\u7f6e<\/strong><\/p>\n<p>MySQL \u7684\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e\u4ee5\u4e0b\u4f4d\u7f6e\uff1a<\/p>\n<p><strong>Linux \u548c macOS\uff1a<\/strong><\/p>\n<ul>\n<li>\/etc\/\/my.cnf<\/li>\n<li>\/etc\/my.cnf<\/li>\n<li>\/usr\/local\/etc\/my.cnf<\/li>\n<\/ul>\n<p><strong>Windows\uff1a<\/strong><\/p>\n<ul>\n<li>C:ProgramDataMySQLMySQL Server X.Ymy.ini<\/li>\n<\/ul>\n<p><strong>\u5176\u4ed6\u4f4d\u7f6e\uff1a<\/strong><\/p>\n<p>\u6b64\u5916\uff0cMySQL \u914d\u7f6e\u6587\u4ef6\u8fd8\u53ef\u4ee5\u5728\u4ee5\u4e0b\u4f4d\u7f6e\u627e\u5230\uff1a<\/p>\n<ul>\n<li>\u5b89\u88c5\u76ee\u5f55\u4e0b\u7684 my.cnf \u6587\u4ef6\uff08\u4f8b\u5982\uff0c\/usr\/local\/mysql\/etc\/my.cnf\uff09<\/li>\n<li>\u901a\u8fc7 &#8211;defaults-file \u9009\u9879\u6307\u5b9a\u7684\u81ea\u5b9a\u4e49\u4f4d\u7f6e<\/li>\n<\/ul>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><\/p>\n<ul>\n<li>X.Y \u8868\u793a MySQL \u7248\u672c\uff0c\u4f8b\u5982 8.0 \u6216 5.7\u3002<\/li>\n<li>ProgramData \u662f\u4e00\u4e2a\uff0c\u53ef\u80fd\u9700\u8981\u5728 Windows \u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u663e\u793a\u9690\u85cf\u6587\u4ef6\u624d\u80fd\u8bbf\u95ee\u5b83\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u7684\u914d\u7f6e\u6587\u4ef6\u5728\u54ea\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>mysql \u914d\u7f6e\u6587\u4ef6\u4f4d\u7f6e\uff1alinux\/macos\uff1a\/etc\/mysql\/my.cnf\u3001\/etc\/my.cnf\u3001\/usr\/local\/etc\/my.cnfwindows\uff1ac:programdatamysqlmysql server x.ymy.ini\u5176\u4ed6\u4f4d\u7f6e\uff1a\u5b89\u88c5\u76ee\u5f55\u4e0b\u7684 my.cnf \u6587\u4ef6\u6216\u901a\u8fc7 &#8211;defaults-file \u9009\u9879\u6307\u5b9a\u7684\u81ea\u5b9a\u4e49\u4f4d\u7f6e MySQL \u914d\u7f6e\u6587\u4ef6\u7684\u6240\u5728\u4f4d\u7f6e MySQL \u7684\u914d\u7f6e\u6587\u4ef6\u901a\u5e38\u4f4d\u4e8e\u4ee5\u4e0b\u4f4d\u7f6e\uff1a Linux \u548c macOS\uff1a \/etc\/\/my.cnf \/etc\/my.cnf \/usr\/local\/etc\/my.cnf Windows\uff1a C:ProgramDataMySQLMySQL Server X.Ymy.ini \u5176\u4ed6\u4f4d\u7f6e\uff1a \u6b64\u5916\uff0cMySQL \u914d\u7f6e\u6587\u4ef6\u8fd8\u53ef\u4ee5\u5728\u4ee5\u4e0b\u4f4d\u7f6e\u627e\u5230\uff1a \u5b89\u88c5\u76ee\u5f55\u4e0b\u7684 my.cnf \u6587\u4ef6\uff08\u4f8b\u5982\uff0c\/usr\/local\/mysql\/etc\/my.cnf\uff09 \u901a\u8fc7 &#8211;defaults-file \u9009\u9879\u6307\u5b9a\u7684\u81ea\u5b9a\u4e49\u4f4d\u7f6e \u6ce8\u610f\uff1a X.Y \u8868\u793a MySQL \u7248\u672c\uff0c\u4f8b\u5982 8.0 \u6216 5.7\u3002 ProgramData \u662f\u4e00\u4e2a\uff0c\u53ef\u80fd\u9700\u8981\u5728 Windows \u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u663e\u793a\u9690\u85cf\u6587\u4ef6\u624d\u80fd\u8bbf\u95ee\u5b83\u3002 \u4ee5\u4e0a\u5c31\u662f\u7684\u914d\u7f6e\u6587\u4ef6\u5728\u54ea\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-6429","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6429","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=6429"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6429\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}