{"id":6524,"date":"2024-11-14T10:39:10","date_gmt":"2024-11-14T02:39:10","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6524\/"},"modified":"2024-11-14T10:39:10","modified_gmt":"2024-11-14T02:39:10","slug":"mysql%e6%80%8e%e4%b9%88%e5%88%a0%e9%99%a4%e5%88%9b%e5%bb%ba%e6%95%b0%e6%8d%ae%e5%ba%93","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6524\/","title":{"rendered":"mysql\u600e\u4e48\u5220\u9664\u521b\u5efa\u6570\u636e\u5e93"},"content":{"rendered":"<blockquote><p>\n  \u8981\u5220\u9664 mysql \u6570\u636e\u5e93\uff0c\u8bf7\u6309\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a1. \u8fde\u63a5\u5230 mysql \u670d\u52a1\u5668\uff1b2. \u8f93\u5165\u547d\u4ee4 drop database [\u6570\u636e\u5e93\u540d\u79f0]\uff1b3. \u786e\u8ba4\u5220\u9664\uff1b4. \u68c0\u67e5\u6570\u636e\u5e93\u662f\u5426\u5df2\u5220\u9664\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/05\/2024080519463432514.jpg\" class=\"aligncenter\" title=\"mysql\u600e\u4e48\u5220\u9664\u521b\u5efa\u6570\u636e\u5e93\u63d2\u56fe\" alt=\"mysql\u600e\u4e48\u5220\u9664\u521b\u5efa\u6570\u636e\u5e93\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5220\u9664\u5728 MySQL \u4e2d\u521b\u5efa\u7684\u6570\u636e\u5e93<\/strong><\/p>\n<p>\u8981\u5220\u9664\u5728 MySQL \u4e2d\u521b\u5efa\u7684\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<p><strong>1. \u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668<\/strong><\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668\uff1a<\/p>\n<pre>mysql -u [\u7528\u6237\u540d] -p[\u5bc6\u7801]<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u66ff\u6362 [\u7528\u6237\u540d] \u548c [\u5bc6\u7801] \u4e3a\u60a8\u7684 MySQL \u51ed\u636e\u3002<\/p>\n<p><strong>2. \u5220\u9664\u6570\u636e\u5e93<\/strong><\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5220\u9664\u6570\u636e\u5e93\uff1a<\/p>\n<pre>DROP DATABASE [\u6570\u636e\u5e93\u540d\u79f0];<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u66ff\u6362 [\u6570\u636e\u5e93\u540d\u79f0] \u4e3a\u8981\u5220\u9664\u7684\u6570\u636e\u5e93\u7684\u540d\u79f0\u3002<\/p>\n<p><strong>3. \u786e\u8ba4\u5220\u9664<\/strong><\/p>\n<p>MySQL \u4f1a\u63d0\u793a\u60a8\u786e\u8ba4\u5220\u9664\u3002\u8f93\u5165 Y \u786e\u8ba4\u6216 N \u53d6\u6d88\u3002<\/p>\n<p><strong>4. \u67e5\u770b\u662f\u5426\u5220\u9664\u6210\u529f<\/strong><\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u6570\u636e\u5e93\u662f\u5426\u5df2\u6210\u529f\u5220\u9664\uff1a<\/p>\n<pre>SHOW DATABASES;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5982\u679c\u6570\u636e\u5e93\u5df2\u6210\u529f\u5220\u9664\uff0c\u5b83\u5c06\u4e0d\u518d\u51fa\u73b0\u5728\u5217\u8868\u4e2d\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u5220\u9664\u521b\u5efa\u6570\u636e\u5e93\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\u5220\u9664 mysql \u6570\u636e\u5e93\uff0c\u8bf7\u6309\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a1. \u8fde\u63a5\u5230 mysql \u670d\u52a1\u5668\uff1b2. \u8f93\u5165\u547d\u4ee4 drop database [\u6570\u636e\u5e93\u540d\u79f0]\uff1b3. \u786e\u8ba4\u5220\u9664\uff1b4. \u68c0\u67e5\u6570\u636e\u5e93\u662f\u5426\u5df2\u5220\u9664\u3002 \u5982\u4f55\u5220\u9664\u5728 MySQL \u4e2d\u521b\u5efa\u7684\u6570\u636e\u5e93 \u8981\u5220\u9664\u5728 MySQL \u4e2d\u521b\u5efa\u7684\u6570\u636e\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a 1. \u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668 \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668\uff1a mysql -u [\u7528\u6237\u540d] -p[\u5bc6\u7801] \u767b\u5f55\u540e\u590d\u5236 \u66ff\u6362 [\u7528\u6237\u540d] \u548c [\u5bc6\u7801] \u4e3a\u60a8\u7684 MySQL \u51ed\u636e\u3002 2. \u5220\u9664\u6570\u636e\u5e93 \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5220\u9664\u6570\u636e\u5e93\uff1a DROP DATABASE [\u6570\u636e\u5e93\u540d\u79f0]; \u767b\u5f55\u540e\u590d\u5236 \u66ff\u6362 [\u6570\u636e\u5e93\u540d\u79f0] \u4e3a\u8981\u5220\u9664\u7684\u6570\u636e\u5e93\u7684\u540d\u79f0\u3002 3. \u786e\u8ba4\u5220\u9664 MySQL \u4f1a\u63d0\u793a\u60a8\u786e\u8ba4\u5220\u9664\u3002\u8f93\u5165 Y \u786e\u8ba4\u6216 N \u53d6\u6d88\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-6524","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6524","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=6524"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6524\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6524"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6524"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6524"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}