{"id":6591,"date":"2024-11-14T08:27:41","date_gmt":"2024-11-14T00:27:41","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6591\/"},"modified":"2024-11-14T08:27:41","modified_gmt":"2024-11-14T00:27:41","slug":"mysql%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%e8%b7%af%e5%be%84","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6591\/","title":{"rendered":"mysql\u914d\u7f6e\u6587\u4ef6\u8def\u5f84"},"content":{"rendered":"<blockquote><p>\n  mysql \u7684\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u56e0\u64cd\u4f5c\u7cfb\u7edf\u800c\u5f02\uff1awindows\uff1ac:windowsmy.ini \u6216 %programdata%mysqlmysql server [version]my.cnflinux\/unix\uff1a\/etc\/mysql\/my.cnf \u6216 \/etc\/my.cnfmacos\uff1a\/etc\/my.cnf \u6216 \/usr\/local\/mysql\/etc\/my.cnf\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/06\/2024080618402575322.jpg\" class=\"aligncenter\" title=\"mysql\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u63d2\u56fe\" alt=\"mysql\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u63d2\u56fe\" \/><\/p>\n<p><strong>MySQL \u914d\u7f6e\u6587\u4ef6\u8def\u5f84<\/strong><\/p>\n<p>MySQL \u7684\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u6839\u636e\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u800c\u5f02\u3002\u5e38\u89c1\u8def\u5f84\u5982\u4e0b\uff1a<\/p>\n<p><strong>Windows\uff1a<\/strong><\/p>\n<ul>\n<li> <strong>My.ini\uff1a<\/strong> C:Windowsmy.ini<\/li>\n<li> <strong>My.cnf\uff1a<\/strong> %PROGRAMDATA%MySQLMySQL Server [VERSION]my.cnf<\/li>\n<\/ul>\n<p><strong>Linux\/Unix\uff1a<\/strong><\/p>\n<ul>\n<li><strong>\/etc\/\/my.cnf<\/strong><\/li>\n<li><strong>\/etc\/my.cnf<\/strong><\/li>\n<li> <strong>~\/.my.cnf<\/strong> (\u7528\u6237\u7684 home \u76ee\u5f55)<\/li>\n<\/ul>\n<p><strong>MacOS\uff1a<\/strong><\/p>\n<ul>\n<li><strong>\/etc\/my.cnf<\/strong><\/li>\n<li><strong>\/usr\/local\/mysql\/etc\/my.cnf<\/strong><\/li>\n<li> <strong>~\/.my.cnf<\/strong> (\u7528\u6237\u7684 home \u76ee\u5f55)<\/li>\n<\/ul>\n<p><strong>\u67e5\u627e\u914d\u7f6e\u6587\u4ef6\u7684\u547d\u4ee4\uff1a<\/strong><\/p>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u627e MySQL \u914d\u7f6e\u6587\u4ef6\u8def\u5f84\uff1a<\/p>\n<pre>find \/ -name my.cnf 2&gt;\/dev\/null<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84\u901a\u5e38\u5b58\u50a8\u5728 MySQL \u670d\u52a1\u5668\u5b89\u88c5\u76ee\u5f55\u7684\u5b50\u76ee\u5f55\u4e2d\u3002\u5982\u679c\u60a8\u65e0\u6cd5\u5728\u4e0a\u9762\u5217\u51fa\u7684\u9ed8\u8ba4\u8def\u5f84\u4e2d\u627e\u5230\u914d\u7f6e\u6587\u4ef6\uff0c\u8bf7\u5c1d\u8bd5\u641c\u7d22\u8be5\u5b89\u88c5\u76ee\u5f55\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\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 \u7684\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u56e0\u64cd\u4f5c\u7cfb\u7edf\u800c\u5f02\uff1awindows\uff1ac:windowsmy.ini \u6216 %programdata%mysqlmysql server [version]my.cnflinux\/unix\uff1a\/etc\/mysql\/my.cnf \u6216 \/etc\/my.cnfmacos\uff1a\/etc\/my.cnf \u6216 \/usr\/local\/mysql\/etc\/my.cnf MySQL \u914d\u7f6e\u6587\u4ef6\u8def\u5f84 MySQL \u7684\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\u6839\u636e\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u800c\u5f02\u3002\u5e38\u89c1\u8def\u5f84\u5982\u4e0b\uff1a Windows\uff1a My.ini\uff1a C:Windowsmy.ini My.cnf\uff1a %PROGRAMDATA%MySQLMySQL Server [VERSION]my.cnf Linux\/Unix\uff1a \/etc\/\/my.cnf \/etc\/my.cnf ~\/.my.cnf (\u7528\u6237\u7684 home \u76ee\u5f55) MacOS\uff1a \/etc\/my.cnf \/usr\/local\/mysql\/etc\/my.cnf ~\/.my.cnf (\u7528\u6237\u7684 home \u76ee\u5f55) \u67e5\u627e\u914d\u7f6e\u6587\u4ef6\u7684\u547d\u4ee4\uff1a \u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u627e MySQL \u914d\u7f6e\u6587\u4ef6\u8def\u5f84\uff1a find \/ -name my.cnf 2&gt;\/dev\/null \u767b\u5f55\u540e\u590d\u5236 \u914d\u7f6e\u6587\u4ef6\u7684\u8def\u5f84\u901a\u5e38\u5b58\u50a8\u5728 MySQL \u670d\u52a1\u5668\u5b89\u88c5\u76ee\u5f55\u7684\u5b50\u76ee\u5f55\u4e2d\u3002\u5982\u679c\u60a8\u65e0\u6cd5\u5728\u4e0a\u9762\u5217\u51fa\u7684\u9ed8\u8ba4\u8def\u5f84\u4e2d\u627e\u5230\u914d\u7f6e\u6587\u4ef6\uff0c\u8bf7\u5c1d\u8bd5\u641c\u7d22\u8be5\u5b89\u88c5\u76ee\u5f55\u3002 \u4ee5\u4e0a\u5c31\u662f\u914d\u7f6e\u6587\u4ef6\u8def\u5f84\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-6591","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6591","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=6591"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6591\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}