{"id":5996,"date":"2024-11-14T11:38:07","date_gmt":"2024-11-14T03:38:07","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5996\/"},"modified":"2024-11-14T11:38:07","modified_gmt":"2024-11-14T03:38:07","slug":"mysql%e7%94%a8cmd%e6%80%8e%e4%b9%88%e7%99%bb%e5%bd%95","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5996\/","title":{"rendered":"mysql\u7528cmd\u600e\u4e48\u767b\u5f55"},"content":{"rendered":"<p><strong>\u5982\u4f55\u4f7f\u7528 cmd \u767b\u5f55 <\/strong><\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26 (CMD) \u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\u767b\u5f55 MySQL\uff1a<\/p>\n<p><strong>\u6b65\u9aa4 1\uff1a\u6253\u5f00 CMD<\/strong><br \/>\u5728 Windows \u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201ccmd\u201d\u5e76\u6309 Enter \u952e\u3002<\/p>\n<p><strong>\u6b65\u9aa4 2\uff1a\u5bfc\u822a\u5230 MySQL bin \u76ee\u5f55<\/strong><br \/>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5bfc\u822a\u5230 MySQL \u5b89\u88c5\u76ee\u5f55\u4e2d\u7684 bin \u76ee\u5f55\uff1a<\/p>\n<pre>cd C:Program FilesMySQLMySQL Server 8.0in<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\uff08\u6839\u636e\u4f60\u7684\u5b9e\u9645 MySQL \u5b89\u88c5\u8def\u5f84\u66ff\u6362\u76ee\u5f55\uff09<\/p>\n<p><strong>\u6b65\u9aa4 3\uff1a\u8fd0\u884c mysql \u547d\u4ee4<\/strong><br \/>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u767b\u5f55 MySQL\uff1a<\/p>\n<pre>mysql -u username -p<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d\uff1a<\/p>\n<ul>\n<li>username \u662f\u4f60\u7684 MySQL \u7528\u6237\u540d\u3002<\/li>\n<li>p \u53c2\u6570\u8868\u793a\u9700\u8981\u8f93\u5165\u5bc6\u7801\u3002<\/li>\n<\/ul>\n<p><strong>\u6b65\u9aa4 4\uff1a\u8f93\u5165\u5bc6\u7801<\/strong><br \/>\u5728\u63d0\u793a\u7b26\u4e0b\u8f93\u5165\u4f60\u7684 MySQL \u5bc6\u7801\u5e76\u6309 Enter \u952e\u3002<\/p>\n<p><strong>\u6b65\u9aa4 5\uff1a\u6210\u529f\u767b\u5f55<\/strong><br \/>\u5982\u679c\u51ed\u636e\u6b63\u786e\uff0c\u4f60\u5c06\u6210\u529f\u767b\u5f55 MySQL\u3002\u4f60\u5c06\u770b\u5230\u4e00\u4e2a\u7c7b\u4f3c\u4e8e\u4ee5\u4e0b\u5185\u5bb9\u7684\u63d0\u793a\uff1a<\/p>\n<pre>mysql&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u63d0\u793a\uff1a<\/strong><\/p>\n<ul>\n<li>\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5b89\u88c5 MySQL\uff0c\u8bf7\u5148\u4ece MySQL \u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002<\/li>\n<li>\u5982\u679c\u5fd8\u8bb0\u4e86\u5bc6\u7801\uff0c\u53ef\u4ee5\u91cd\u7f6e\u5bc6\u7801\u6216\u4f7f\u7528 root \u7528\u6237\u767b\u5f55\uff08\u5982\u679c\u53ef\u7528\uff09\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u7528cmd\u600e\u4e48\u767b\u5f55\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>\u5982\u4f55\u4f7f\u7528 cmd \u767b\u5f55 \u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26 (CMD) \u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\u767b\u5f55 MySQL\uff1a \u6b65\u9aa4 1\uff1a\u6253\u5f00 CMD\u5728 Windows \u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201ccmd\u201d\u5e76\u6309 Enter \u952e\u3002 \u6b65\u9aa4 2\uff1a\u5bfc\u822a\u5230 MySQL bin \u76ee\u5f55\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5bfc\u822a\u5230 MySQL \u5b89\u88c5\u76ee\u5f55\u4e2d\u7684 bin \u76ee\u5f55\uff1a cd C:Program FilesMySQLMySQL Server 8.0in \u767b\u5f55\u540e\u590d\u5236 \uff08\u6839\u636e\u4f60\u7684\u5b9e\u9645 MySQL \u5b89\u88c5\u8def\u5f84\u66ff\u6362\u76ee\u5f55\uff09 \u6b65\u9aa4 3\uff1a\u8fd0\u884c mysql \u547d\u4ee4\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u767b\u5f55 MySQL\uff1a mysql -u username -p \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff1a username \u662f\u4f60\u7684 MySQL \u7528\u6237\u540d\u3002 p \u53c2\u6570\u8868\u793a\u9700\u8981\u8f93\u5165\u5bc6\u7801\u3002 \u6b65\u9aa4 4\uff1a\u8f93\u5165\u5bc6\u7801\u5728\u63d0\u793a\u7b26\u4e0b\u8f93\u5165\u4f60\u7684 MySQL \u5bc6\u7801\u5e76\u6309 Enter \u952e\u3002 [&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-5996","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5996","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=5996"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5996\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}