{"id":6337,"date":"2024-11-14T12:38:48","date_gmt":"2024-11-14T04:38:48","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6337\/"},"modified":"2024-11-14T12:38:48","modified_gmt":"2024-11-14T04:38:48","slug":"mysql%e6%9c%8d%e5%8a%a1%e5%90%af%e5%8a%a8%e4%b8%8d%e4%ba%86","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6337\/","title":{"rendered":"mysql\u670d\u52a1\u542f\u52a8\u4e0d\u4e86"},"content":{"rendered":"<blockquote><p>\n  mysql \u670d\u52a1\u542f\u52a8\u5931\u8d25\u7684\u539f\u56e0\u5305\u62ec\uff1a\u7aef\u53e3\u5360\u7528\u3001\u6570\u636e\u76ee\u5f55\u635f\u574f\u3001\u914d\u7f6e\u6587\u4ef6\u9519\u8bef\u3001\u8d44\u6e90\u4e0d\u8db3\u3001\u9632\u706b\u5899\u963b\u6b62\u548c\u670d\u52a1\u4f9d\u8d56\u5173\u7cfb\u672a\u6ee1\u8db3\u3002\u89e3\u51b3\u65b9\u6848\u5305\u62ec\uff1a\u68c0\u67e5\u7aef\u53e3\u3001\u4fee\u590d\u6570\u636e\u76ee\u5f55\u3001\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u3001\u68c0\u67e5\u7cfb\u7edf\u8d44\u6e90\u3001\u68c0\u67e5\u9632\u706b\u5899\u548c\u68c0\u67e5\u670d\u52a1\u4f9d\u8d56\u5173\u7cfb\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202407\/31\/2024073122561725454.jpg\" class=\"aligncenter\" title=\"mysql\u670d\u52a1\u542f\u52a8\u4e0d\u4e86\u63d2\u56fe\" alt=\"mysql\u670d\u52a1\u542f\u52a8\u4e0d\u4e86\u63d2\u56fe\" \/><\/p>\n<p><strong>MySQL \u670d\u52a1\u542f\u52a8\u5931\u8d25<\/strong><\/p>\n<p><strong>\u75c7\u72b6\uff1a<\/strong><br \/>\u5f53\u5c1d\u8bd5\u542f\u52a8 MySQL \u670d\u52a1\u65f6\uff0c\u9047\u5230\u62a5\u9519\u6216\u670d\u52a1\u65e0\u6cd5\u542f\u52a8\u3002<\/p>\n<p><strong>\u539f\u56e0\uff1a<\/strong><br \/>MySQL \u670d\u52a1\u542f\u52a8\u5931\u8d25\u7684\u539f\u56e0\u6709\u5f88\u591a\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>MySQL \u7aef\u53e3\u88ab\u5360\u7528<\/li>\n<li>MySQL \u6570\u636e\u76ee\u5f55\u635f\u574f<\/li>\n<li>MySQL \u914d\u7f6e\u6587\u4ef6\u5b58\u5728\u9519\u8bef<\/li>\n<li>\u7cfb\u7edf\u8d44\u6e90\u4e0d\u8db3<\/li>\n<li>\u9632\u706b\u5899\u963b\u6b62 MySQL \u8bbf\u95ee<\/li>\n<li>MySQL \u670d\u52a1\u4f9d\u8d56\u5173\u7cfb\u672a\u6ee1\u8db3<\/li>\n<\/ul>\n<p><strong>\u89e3\u51b3\u65b9\u6848\uff1a<\/strong><\/p>\n<p><strong>1. \u68c0\u67e5 MySQL \u7aef\u53e3<\/strong><br \/>\u786e\u4fdd\u6ca1\u6709\u5176\u4ed6\u8fdb\u7a0b\u6b63\u5728\u4f7f\u7528 MySQL \u9ed8\u8ba4\u7aef\u53e3\uff08\u901a\u5e38\u4e3a 3306\uff09\u3002\u5982\u679c\u5176\u4ed6\u8fdb\u7a0b\u6b63\u5728\u4f7f\u7528\u8be5\u7aef\u53e3\uff0c\u8bf7\u5173\u95ed\u6216\u91cd\u65b0\u914d\u7f6e\u5b83\u4eec\u3002<\/p>\n<p><strong>2. \u4fee\u590d MySQL \u6570\u636e\u76ee\u5f55<\/strong><br \/>\u5c1d\u8bd5\u4fee\u590d MySQL \u6570\u636e\u76ee\u5f55\uff1a<\/p>\n<ul>\n<li>\u505c\u6b62 MySQL \u670d\u52a1\u3002<\/li>\n<li>\u8fd0\u884c check -r &#8211;data-dir=\/path\/to\/mysql\/data \u547d\u4ee4\u3002<\/li>\n<li>\u91cd\u65b0\u542f\u52a8 MySQL \u670d\u52a1\u3002<\/li>\n<\/ul>\n<p><strong>3. \u68c0\u67e5 MySQL \u914d\u7f6e\u6587\u4ef6<\/strong><br \/>\u67e5\u770b MySQL \u914d\u7f6e\u6587\u4ef6 \/etc\/my.cnf \u6216 \/my.ini \u4e2d\u662f\u5426\u5b58\u5728\u9519\u8bef\u3002\u786e\u4fdd\u4ee5\u4e0b\u8bbe\u7f6e\u6b63\u786e\uff1a<\/p>\n<ul>\n<li>bind-address\uff1aMySQL \u76d1\u542c\u7684\u5730\u5740<\/li>\n<li>datadir\uff1aMySQL \u6570\u636e\u76ee\u5f55\u7684\u4f4d\u7f6e<\/li>\n<li>port\uff1aMySQL \u7aef\u53e3\u53f7<\/li>\n<\/ul>\n<p><strong>4. \u68c0\u67e5\u7cfb\u7edf\u8d44\u6e90<\/strong><br \/>\u786e\u4fdd\u7cfb\u7edf\u6709\u8db3\u591f\u7684\u5185\u5b58\u548c\u5904\u7406\u5668\u8d44\u6e90\u6765\u8fd0\u884c MySQL\u3002\u5982\u679c\u8d44\u6e90\u4e0d\u8db3\uff0c\u8bf7\u5c1d\u8bd5\u5173\u95ed\u5176\u4ed6\u4e0d\u9700\u8981\u7684\u8fdb\u7a0b\u3002<\/p>\n<p><strong>5. \u68c0\u67e5\u9632\u706b\u5899<\/strong><br \/>\u9632\u706b\u5899\u53ef\u80fd\u963b\u6b62 MySQL \u8bbf\u95ee\u5916\u90e8\u7f51\u7edc\u3002\u786e\u4fdd\u9632\u706b\u5899\u5141\u8bb8 MySQL \u901a\u8fc7\u5176\u7aef\u53e3\uff08\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4e3a 3306\uff09\u3002<\/p>\n<p><strong>6. \u68c0\u67e5\u670d\u52a1\u4f9d\u8d56\u5173\u7cfb<\/strong><br \/>MySQL \u53ef\u80fd\u4f9d\u8d56\u4e8e\u5176\u4ed6\u670d\u52a1\uff0c\u4f8b\u5982 MySQLd\u3001MariaDB \u6216 Percona Server\u3002\u786e\u4fdd\u8fd9\u4e9b\u670d\u52a1\u5df2\u542f\u52a8\u5e76\u6b63\u5728\u8fd0\u884c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u670d\u52a1\u542f\u52a8\u4e0d\u4e86\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 \u670d\u52a1\u542f\u52a8\u5931\u8d25\u7684\u539f\u56e0\u5305\u62ec\uff1a\u7aef\u53e3\u5360\u7528\u3001\u6570\u636e\u76ee\u5f55\u635f\u574f\u3001\u914d\u7f6e\u6587\u4ef6\u9519\u8bef\u3001\u8d44\u6e90\u4e0d\u8db3\u3001\u9632\u706b\u5899\u963b\u6b62\u548c\u670d\u52a1\u4f9d\u8d56\u5173\u7cfb\u672a\u6ee1\u8db3\u3002\u89e3\u51b3\u65b9\u6848\u5305\u62ec\uff1a\u68c0\u67e5\u7aef\u53e3\u3001\u4fee\u590d\u6570\u636e\u76ee\u5f55\u3001\u68c0\u67e5\u914d\u7f6e\u6587\u4ef6\u3001\u68c0\u67e5\u7cfb\u7edf\u8d44\u6e90\u3001\u68c0\u67e5\u9632\u706b\u5899\u548c\u68c0\u67e5\u670d\u52a1\u4f9d\u8d56\u5173\u7cfb\u3002 MySQL \u670d\u52a1\u542f\u52a8\u5931\u8d25 \u75c7\u72b6\uff1a\u5f53\u5c1d\u8bd5\u542f\u52a8 MySQL \u670d\u52a1\u65f6\uff0c\u9047\u5230\u62a5\u9519\u6216\u670d\u52a1\u65e0\u6cd5\u542f\u52a8\u3002 \u539f\u56e0\uff1aMySQL \u670d\u52a1\u542f\u52a8\u5931\u8d25\u7684\u539f\u56e0\u6709\u5f88\u591a\uff0c\u5305\u62ec\uff1a MySQL \u7aef\u53e3\u88ab\u5360\u7528 MySQL \u6570\u636e\u76ee\u5f55\u635f\u574f MySQL \u914d\u7f6e\u6587\u4ef6\u5b58\u5728\u9519\u8bef \u7cfb\u7edf\u8d44\u6e90\u4e0d\u8db3 \u9632\u706b\u5899\u963b\u6b62 MySQL \u8bbf\u95ee MySQL \u670d\u52a1\u4f9d\u8d56\u5173\u7cfb\u672a\u6ee1\u8db3 \u89e3\u51b3\u65b9\u6848\uff1a 1. \u68c0\u67e5 MySQL \u7aef\u53e3\u786e\u4fdd\u6ca1\u6709\u5176\u4ed6\u8fdb\u7a0b\u6b63\u5728\u4f7f\u7528 MySQL \u9ed8\u8ba4\u7aef\u53e3\uff08\u901a\u5e38\u4e3a 3306\uff09\u3002\u5982\u679c\u5176\u4ed6\u8fdb\u7a0b\u6b63\u5728\u4f7f\u7528\u8be5\u7aef\u53e3\uff0c\u8bf7\u5173\u95ed\u6216\u91cd\u65b0\u914d\u7f6e\u5b83\u4eec\u3002 2. \u4fee\u590d MySQL \u6570\u636e\u76ee\u5f55\u5c1d\u8bd5\u4fee\u590d MySQL \u6570\u636e\u76ee\u5f55\uff1a \u505c\u6b62 MySQL \u670d\u52a1\u3002 \u8fd0\u884c check -r &#8211;data-dir=\/path\/to\/mysql\/data \u547d\u4ee4\u3002 \u91cd\u65b0\u542f\u52a8 MySQL \u670d\u52a1\u3002 3. \u68c0\u67e5 MySQL \u914d\u7f6e\u6587\u4ef6\u67e5\u770b MySQL \u914d\u7f6e\u6587\u4ef6 \/etc\/my.cnf \u6216 \/my.ini [&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-6337","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6337","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=6337"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6337\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}