{"id":5522,"date":"2024-11-14T09:23:10","date_gmt":"2024-11-14T01:23:10","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5522\/"},"modified":"2024-11-14T09:23:10","modified_gmt":"2024-11-14T01:23:10","slug":"mysql%e6%80%8e%e4%b9%88%e7%94%a8%e5%91%bd%e4%bb%a4%e5%90%af%e5%8a%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5522\/","title":{"rendered":"mysql\u600e\u4e48\u7528\u547d\u4ee4\u542f\u52a8"},"content":{"rendered":"<blockquote><p>\n  \u8981\u5728\u547d\u4ee4\u884c\u4e2d\u542f\u52a8 mysql\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff1b\u5bfc\u822a\u5230 mysql \u5b89\u88c5\u76ee\u5f55\u7684 bin \u5b50\u76ee\u5f55\uff1b\u542f\u52a8 mysql \u670d\u52a1\u5668\uff1amysqld\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/29\/2024052907422067139.jpg\" class=\"aligncenter\" title=\"mysql\u600e\u4e48\u7528\u547d\u4ee4\u542f\u52a8\u63d2\u56fe\" alt=\"mysql\u600e\u4e48\u7528\u547d\u4ee4\u542f\u52a8\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728\u547d\u4ee4\u884c\u4e2d\u542f\u52a8 MySQL<\/strong><\/p>\n<p>\u8981\u5728\u547d\u4ee4\u884c\u4e2d\u542f\u52a8 MySQL\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<p><strong>1. \u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\u3002<\/strong><\/p>\n<ul>\n<li>\u5728 Windows \u4e0a\uff0c\u6309 Windows + R\uff0c\u952e\u5165 cmd\uff0c\u7136\u540e\u6309 Enter\u3002<\/li>\n<li>\u5728 macOS \u548c Linux \u4e0a\uff0c\u6253\u5f00\u7ec8\u7aef\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<\/ul>\n<p><strong>2. \u5bfc\u822a\u5230 MySQL \u5b89\u88c5\u76ee\u5f55\u7684 bin \u5b50\u76ee\u5f55\u3002<\/strong><\/p>\n<p>\u4f8b\u5982\uff0c\u5728 Windows \u4e0a\uff0c\u8f6c\u5230\u4ee5\u4e0b\u76ee\u5f55\uff1a<\/p>\n<pre>cd C:Program FilesMySQLMySQL Server 8.0in<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728 macOS \u548c Linux \u4e0a\uff0c\u8f6c\u5230\u4ee5\u4e0b\u76ee\u5f55\uff1a<\/p>\n<pre>cd \/usr\/local\/mysql\/bin<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>3. \u542f\u52a8 MySQL \u670d\u52a1\u5668\u3002<\/strong><\/p>\n<p>\u8981\u542f\u52a8 MySQL \u670d\u52a1\u5668\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>mysqld<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u542f\u52a8 MySQL \u670d\u52a1\u5668\uff0c\u76d1\u542c\u9ed8\u8ba4\u7aef\u53e3\uff08\u901a\u5e38\u4e3a 3306\uff09\u3002<\/p>\n<p><strong>4. \u68c0\u67e5\u670d\u52a1\u5668\u72b6\u6001\uff08\u53ef\u9009\uff09\u3002<\/strong><\/p>\n<p>\u8981\u5728\u4e0d\u8fde\u63a5\u5230\u670d\u52a1\u5668\u7684\u60c5\u51b5\u4e0b\u68c0\u67e5\u5176\u72b6\u6001\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>mysqladmin -u root status<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u663e\u793a\u670d\u52a1\u5668\u7684\u72b6\u6001\u4fe1\u606f\uff0c\u5305\u62ec\u662f\u5426\u6b63\u5728\u8fd0\u884c\u3002<\/p>\n<p><strong>5. \u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668\uff08\u53ef\u9009\uff09\u3002<\/strong><\/p>\n<p>\u8981\u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668\uff0c\u8bf7\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>mysql -u root -p<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u63d0\u793a\u60a8\u8f93\u5165 MySQL \u6839\u7528\u6237\u7684\u5bc6\u7801\u3002\u8f93\u5165\u5bc6\u7801\u540e\uff0c\u60a8\u5c06\u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u7528\u547d\u4ee4\u542f\u52a8\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>\u8981\u5728\u547d\u4ee4\u884c\u4e2d\u542f\u52a8 mysql\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff1b\u5bfc\u822a\u5230 mysql \u5b89\u88c5\u76ee\u5f55\u7684 bin \u5b50\u76ee\u5f55\uff1b\u542f\u52a8 mysql \u670d\u52a1\u5668\uff1amysqld\u3002 \u5982\u4f55\u5728\u547d\u4ee4\u884c\u4e2d\u542f\u52a8 MySQL \u8981\u5728\u547d\u4ee4\u884c\u4e2d\u542f\u52a8 MySQL\uff0c\u8bf7\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a 1. \u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\u3002 \u5728 Windows \u4e0a\uff0c\u6309 Windows + R\uff0c\u952e\u5165 cmd\uff0c\u7136\u540e\u6309 Enter\u3002 \u5728 macOS \u548c Linux \u4e0a\uff0c\u6253\u5f00\u7ec8\u7aef\u5e94\u7528\u7a0b\u5e8f\u3002 2. \u5bfc\u822a\u5230 MySQL \u5b89\u88c5\u76ee\u5f55\u7684 bin \u5b50\u76ee\u5f55\u3002 \u4f8b\u5982\uff0c\u5728 Windows \u4e0a\uff0c\u8f6c\u5230\u4ee5\u4e0b\u76ee\u5f55\uff1a cd C:Program FilesMySQLMySQL Server 8.0in \u767b\u5f55\u540e\u590d\u5236 \u5728 macOS \u548c Linux \u4e0a\uff0c\u8f6c\u5230\u4ee5\u4e0b\u76ee\u5f55\uff1a cd \/usr\/local\/mysql\/bin \u767b\u5f55\u540e\u590d\u5236 3. \u542f\u52a8 MySQL \u670d\u52a1\u5668\u3002 \u8981\u542f\u52a8 [&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-5522","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5522","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=5522"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5522\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}