{"id":6593,"date":"2024-11-14T08:51:42","date_gmt":"2024-11-14T00:51:42","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6593\/"},"modified":"2024-11-14T08:51:42","modified_gmt":"2024-11-14T00:51:42","slug":"mysql%e5%ae%89%e8%a3%85%e7%9b%ae%e5%bd%95%e5%9c%a8%e5%93%aa%e9%87%8c","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6593\/","title":{"rendered":"mysql\u5b89\u88c5\u76ee\u5f55\u5728\u54ea\u91cc"},"content":{"rendered":"<blockquote><p>\n  mysql \u5b89\u88c5\u76ee\u5f55\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u548c\u5b89\u88c5\u65b9\u5f0f\u800c\u5f02\uff0c\u5e38\u89c1\u8def\u5f84\u5305\u62ec\uff1awindows\uff1ac:program filesmysqlmysql server [\u7248\u672c\u53f7]linux\/macos\uff1a\/usr\/local\/mysqldocker\uff1a\u5bb9\u5668\u5185\uff1a\/var\/lib\/mysql\u5176\u4ed6\u5b89\u88c5\u65b9\u5f0f\uff1a\u81ea\u5b9a\u4e49\u8def\u5f84\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/06\/2024080618430242865.jpg\" class=\"aligncenter\" title=\"mysql\u5b89\u88c5\u76ee\u5f55\u5728\u54ea\u91cc\u63d2\u56fe\" alt=\"mysql\u5b89\u88c5\u76ee\u5f55\u5728\u54ea\u91cc\u63d2\u56fe\" \/><\/p>\n<p><strong>MySQL \u5b89\u88c5\u76ee\u5f55<\/strong><\/p>\n<p><strong>MySQL \u5b89\u88c5\u76ee\u5f55\u4f4d\u4e8e\u4ee5\u4e0b\u8def\u5f84\uff1a<\/strong><\/p>\n<p>\u6839\u636e\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u548c\u5b89\u88c5\u65b9\u5f0f\uff0cMySQL \u7684\u5b89\u88c5\u76ee\u5f55\u53ef\u80fd\u6709\u6240\u4e0d\u540c\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u5e38\u89c1\u7684\u5b89\u88c5\u76ee\u5f55\u5982\u4e0b\uff1a<\/p>\n<p><strong>Windows:<\/strong><\/p>\n<ul>\n<li> <strong>\u9ed8\u8ba4\u5b89\u88c5\u8def\u5f84\uff1a<\/strong> C:Program FilesMySQLMySQL Server [\u7248\u672c\u53f7]<\/li>\n<\/ul>\n<p><strong>Linux\/macOS:<\/strong><\/p>\n<ul>\n<li> <strong>\u9ed8\u8ba4\u5b89\u88c5\u8def\u5f84\uff1a<\/strong> \/usr\/local\/ <\/li>\n<\/ul>\n<p><strong>Docker:<\/strong><\/p>\n<ul>\n<li> <strong>\u5bb9\u5668\u5185\uff1a<\/strong> \/var\/lib\/mysql<\/li>\n<\/ul>\n<p><strong>\u5176\u4ed6\u5b89\u88c5\u65b9\u5f0f:<\/strong><\/p>\n<ul>\n<li>\u5982\u679c\u901a\u8fc7\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b89\u88c5\uff0c\u5b89\u88c5\u76ee\u5f55\u5c06\u5728\u60a8\u6307\u5b9a\u7684\u8def\u5f84\u4e2d\u3002<\/li>\n<li>\u5982\u679c\u901a\u8fc7\u5176\u4ed6\u5305\u7ba1\u7406\u5668\uff08\u5982 Homebrew\uff09\u5b89\u88c5\uff0c\u5b89\u88c5\u76ee\u5f55\u53ef\u80fd\u4f1a\u6709\u6240\u4e0d\u540c\u3002<\/li>\n<\/ul>\n<p><strong>\u5982\u4f55\u68c0\u67e5 MySQL \u5b89\u88c5\u76ee\u5f55:<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 MySQL \u547d\u4ee4\u884c\u5ba2\u6237\u7aef\u5e76\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/li>\n<\/ul>\n<pre>SELECT @@basedir;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ul>\n<li>\u8be5\u547d\u4ee4\u5c06\u8fd4\u56de MySQL \u5b89\u88c5\u76ee\u5f55\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5b89\u88c5\u76ee\u5f55\u5728\u54ea\u91cc\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 \u5b89\u88c5\u76ee\u5f55\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u548c\u5b89\u88c5\u65b9\u5f0f\u800c\u5f02\uff0c\u5e38\u89c1\u8def\u5f84\u5305\u62ec\uff1awindows\uff1ac:program filesmysqlmysql server [\u7248\u672c\u53f7]linux\/macos\uff1a\/usr\/local\/mysqldocker\uff1a\u5bb9\u5668\u5185\uff1a\/var\/lib\/mysql\u5176\u4ed6\u5b89\u88c5\u65b9\u5f0f\uff1a\u81ea\u5b9a\u4e49\u8def\u5f84 MySQL \u5b89\u88c5\u76ee\u5f55 MySQL \u5b89\u88c5\u76ee\u5f55\u4f4d\u4e8e\u4ee5\u4e0b\u8def\u5f84\uff1a \u6839\u636e\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u548c\u5b89\u88c5\u65b9\u5f0f\uff0cMySQL \u7684\u5b89\u88c5\u76ee\u5f55\u53ef\u80fd\u6709\u6240\u4e0d\u540c\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u5e38\u89c1\u7684\u5b89\u88c5\u76ee\u5f55\u5982\u4e0b\uff1a Windows: \u9ed8\u8ba4\u5b89\u88c5\u8def\u5f84\uff1a C:Program FilesMySQLMySQL Server [\u7248\u672c\u53f7] Linux\/macOS: \u9ed8\u8ba4\u5b89\u88c5\u8def\u5f84\uff1a \/usr\/local\/ Docker: \u5bb9\u5668\u5185\uff1a \/var\/lib\/mysql \u5176\u4ed6\u5b89\u88c5\u65b9\u5f0f: \u5982\u679c\u901a\u8fc7\u6e90\u4ee3\u7801\u7f16\u8bd1\u5b89\u88c5\uff0c\u5b89\u88c5\u76ee\u5f55\u5c06\u5728\u60a8\u6307\u5b9a\u7684\u8def\u5f84\u4e2d\u3002 \u5982\u679c\u901a\u8fc7\u5176\u4ed6\u5305\u7ba1\u7406\u5668\uff08\u5982 Homebrew\uff09\u5b89\u88c5\uff0c\u5b89\u88c5\u76ee\u5f55\u53ef\u80fd\u4f1a\u6709\u6240\u4e0d\u540c\u3002 \u5982\u4f55\u68c0\u67e5 MySQL \u5b89\u88c5\u76ee\u5f55: \u6253\u5f00 MySQL \u547d\u4ee4\u884c\u5ba2\u6237\u7aef\u5e76\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a SELECT @@basedir; \u767b\u5f55\u540e\u590d\u5236 \u8be5\u547d\u4ee4\u5c06\u8fd4\u56de MySQL \u5b89\u88c5\u76ee\u5f55\u3002 \u4ee5\u4e0a\u5c31\u662f\u5b89\u88c5\u76ee\u5f55\u5728\u54ea\u91cc\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-6593","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6593","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=6593"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6593\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}