{"id":6460,"date":"2024-11-14T11:58:13","date_gmt":"2024-11-14T03:58:13","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6460\/"},"modified":"2024-11-14T11:58:13","modified_gmt":"2024-11-14T03:58:13","slug":"%e6%80%8e%e4%b9%88%e5%88%9d%e5%a7%8b%e5%8c%96mysql%e6%95%b0%e6%8d%ae%e5%ba%93","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6460\/","title":{"rendered":"\u600e\u4e48\u521d\u59cb\u5316mysql\u6570\u636e\u5e93"},"content":{"rendered":"<blockquote><p>\n  \u521d\u59cb\u5316 mysql \u6570\u636e\u5e93\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528 mysql \u547d\u4ee4\u884c\uff1a\u5220\u9664\u73b0\u6709\u6570\u636e\u5e93\u5e76\u521b\u5efa\u65b0\u7684\u6570\u636e\u5e93\uff1b\u4f7f\u7528 mysql workbench\uff1a\u5728\u201c\u7ba1\u7406\u201d\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u521d\u59cb\u5316\u6570\u636e\u5e93\u201d\uff1b\u4f7f\u7528 navicat\uff1a\u5728\u201c\u5de5\u5177\u201d\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u521d\u59cb\u5316\u6570\u636e\u5e93\u201d\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/05\/2024080507553227085.jpg\" class=\"aligncenter\" title=\"\u600e\u4e48\u521d\u59cb\u5316mysql\u6570\u636e\u5e93\u63d2\u56fe\" alt=\"\u600e\u4e48\u521d\u59cb\u5316mysql\u6570\u636e\u5e93\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u521d\u59cb\u5316 MySQL \u6570\u636e\u5e93<\/strong><\/p>\n<p>\u521d\u59cb\u5316 MySQL \u6570\u636e\u5e93\u662f\u4e00\u4e2a\u5fc5\u8981\u7684\u8fc7\u7a0b\uff0c\u53ef\u4ee5\u6e05\u9664\u6570\u636e\u5e93\u4e2d\u7684\u6240\u6709\u73b0\u6709\u6570\u636e\u5e76\u5c06\u5176\u91cd\u7f6e\u4e3a\u521d\u59cb\u72b6\u6001\u3002\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u521d\u59cb\u5316 MySQL \u6570\u636e\u5e93\u3002<\/p>\n<p><strong>\u65b9\u6cd5 1\uff1a\u4f7f\u7528 MySQL \u547d\u4ee4\u884c<\/strong><\/p>\n<pre>mysql -u [\u7528\u6237\u540d] -p[\u5bc6\u7801]<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ul>\n<li>\u8f93\u5165 MySQL \u547d\u4ee4\u884c\u3002<\/li>\n<li>\u8f93\u5165\u6570\u636e\u5e93\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002<\/li>\n<\/ul>\n<pre>DROP DATABASE [\u6570\u636e\u5e93\u540d];\nCREATE DATABASE [\u6570\u636e\u5e93\u540d];<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ul>\n<li>\u6267\u884c DROP DATABASE \u547d\u4ee4\u5220\u9664\u73b0\u6709\u7684\u6570\u636e\u5e93\u3002<\/li>\n<li>\u6267\u884c CREATE DATABASE \u547d\u4ee4\u521b\u5efa\u65b0\u7684\u6570\u636e\u5e93\u3002<\/li>\n<\/ul>\n<p><strong>\u65b9\u6cd5 2\uff1a\u4f7f\u7528 MySQL Workbench<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 MySQL Workbench\u3002<\/li>\n<li>\u5728\u201c\u6570\u636e\u5e93\u201d\u9009\u9879\u5361\u4e2d\uff0c\u53f3\u952e\u5355\u51fb\u8981\u521d\u59cb\u5316\u7684\u6570\u636e\u5e93\u3002<\/li>\n<li>\u9009\u62e9\u201c\u7ba1\u7406\u201d&gt;\u201c\u521d\u59cb\u5316\u6570\u636e\u5e93\u201d\u3002<\/li>\n<li>\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9\u201c\u5feb\u901f\u201d\u6216\u201c\u81ea\u5b9a\u4e49\u201d\u521d\u59cb\u5316\u6a21\u5f0f\u3002<\/li>\n<\/ul>\n<p><strong>\u65b9\u6cd5 3\uff1a\u4f7f\u7528 Navicat<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 Navicat\u3002<\/li>\n<li>\u5728\u201c\u6570\u636e\u5e93\u201d\u9009\u9879\u5361\u4e2d\uff0c\u53f3\u952e\u5355\u51fb\u8981\u521d\u59cb\u5316\u7684\u6570\u636e\u5e93\u3002<\/li>\n<li>\u9009\u62e9\u201c\u5de5\u5177\u201d&gt;\u201c\u521d\u59cb\u5316\u6570\u636e\u5e93\u201d\u3002<\/li>\n<li>\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9\u201c\u5feb\u901f\u201d\u6216\u201c\u9ad8\u7ea7\u201d\u521d\u59cb\u5316\u6a21\u5f0f\u3002<\/li>\n<\/ul>\n<p><strong>\u6ce8\u610f\uff1a<\/strong><\/p>\n<ul>\n<li>\u5728\u521d\u59cb\u5316\u6570\u636e\u5e93\u4e4b\u524d\uff0c\u8bf7\u786e\u4fdd\u5df2\u5907\u4efd\u6240\u6709\u91cd\u8981\u6570\u636e\u3002<\/li>\n<li>\u521d\u59cb\u5316\u6570\u636e\u5e93\u5c06\u6e05\u9664\u6570\u636e\u5e93\u4e2d\u7684\u6240\u6709\u73b0\u6709\u6570\u636e\u3002<\/li>\n<li>\u4e00\u65e6\u521d\u59cb\u5316\u6570\u636e\u5e93\uff0c\u5c31\u65e0\u6cd5\u6062\u590d\u5df2\u5220\u9664\u7684\u6570\u636e\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u521d\u59cb\u5316\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>\u521d\u59cb\u5316 mysql \u6570\u636e\u5e93\u7684\u65b9\u6cd5\u6709\uff1a\u4f7f\u7528 mysql \u547d\u4ee4\u884c\uff1a\u5220\u9664\u73b0\u6709\u6570\u636e\u5e93\u5e76\u521b\u5efa\u65b0\u7684\u6570\u636e\u5e93\uff1b\u4f7f\u7528 mysql workbench\uff1a\u5728\u201c\u7ba1\u7406\u201d\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u521d\u59cb\u5316\u6570\u636e\u5e93\u201d\uff1b\u4f7f\u7528 navicat\uff1a\u5728\u201c\u5de5\u5177\u201d\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u521d\u59cb\u5316\u6570\u636e\u5e93\u201d\u3002 \u5982\u4f55\u521d\u59cb\u5316 MySQL \u6570\u636e\u5e93 \u521d\u59cb\u5316 MySQL \u6570\u636e\u5e93\u662f\u4e00\u4e2a\u5fc5\u8981\u7684\u8fc7\u7a0b\uff0c\u53ef\u4ee5\u6e05\u9664\u6570\u636e\u5e93\u4e2d\u7684\u6240\u6709\u73b0\u6709\u6570\u636e\u5e76\u5c06\u5176\u91cd\u7f6e\u4e3a\u521d\u59cb\u72b6\u6001\u3002\u6709\u51e0\u79cd\u65b9\u6cd5\u53ef\u4ee5\u521d\u59cb\u5316 MySQL \u6570\u636e\u5e93\u3002 \u65b9\u6cd5 1\uff1a\u4f7f\u7528 MySQL \u547d\u4ee4\u884c mysql -u [\u7528\u6237\u540d] -p[\u5bc6\u7801] \u767b\u5f55\u540e\u590d\u5236 \u8f93\u5165 MySQL \u547d\u4ee4\u884c\u3002 \u8f93\u5165\u6570\u636e\u5e93\u7528\u6237\u540d\u548c\u5bc6\u7801\u3002 DROP DATABASE [\u6570\u636e\u5e93\u540d]; CREATE DATABASE [\u6570\u636e\u5e93\u540d]; \u767b\u5f55\u540e\u590d\u5236 \u6267\u884c DROP DATABASE \u547d\u4ee4\u5220\u9664\u73b0\u6709\u7684\u6570\u636e\u5e93\u3002 \u6267\u884c CREATE DATABASE \u547d\u4ee4\u521b\u5efa\u65b0\u7684\u6570\u636e\u5e93\u3002 \u65b9\u6cd5 2\uff1a\u4f7f\u7528 MySQL Workbench \u6253\u5f00 MySQL Workbench\u3002 \u5728\u201c\u6570\u636e\u5e93\u201d\u9009\u9879\u5361\u4e2d\uff0c\u53f3\u952e\u5355\u51fb\u8981\u521d\u59cb\u5316\u7684\u6570\u636e\u5e93\u3002 \u9009\u62e9\u201c\u7ba1\u7406\u201d&gt;\u201c\u521d\u59cb\u5316\u6570\u636e\u5e93\u201d\u3002 \u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9\u201c\u5feb\u901f\u201d\u6216\u201c\u81ea\u5b9a\u4e49\u201d\u521d\u59cb\u5316\u6a21\u5f0f\u3002 \u65b9\u6cd5 [&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-6460","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6460","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=6460"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6460\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}