{"id":5467,"date":"2024-11-14T11:20:52","date_gmt":"2024-11-14T03:20:52","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5467\/"},"modified":"2024-11-14T11:20:52","modified_gmt":"2024-11-14T03:20:52","slug":"%e6%80%8e%e4%b9%88%e6%8a%8a%e5%8e%9f%e6%9c%89%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e6%96%87%e4%bb%b6%e5%af%bc%e5%85%a5mysql%e4%b8%ad","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5467\/","title":{"rendered":"\u600e\u4e48\u628a\u539f\u6709\u7684\u6570\u636e\u5e93\u6587\u4ef6\u5bfc\u5165mysql\u4e2d"},"content":{"rendered":"<blockquote><p>\n  \u5bfc\u5165 mysql \u6570\u636e\u5e93\u6587\u4ef6\u7684\u65b9\u6cd5\uff1a\u4f7f\u7528 mysql workbench \u56fe\u5f62\u5de5\u5177\uff1a\u6253\u5f00 mysql workbench\uff0c\u8fde\u63a5\u5230\u670d\u52a1\u5668\uff0c\u5728\u7ba1\u7406\u9009\u9879\u5361\u4e2d\u9009\u62e9\u201c\u5bfc\u5165\u201d\uff0c\u9009\u62e9\u6587\u4ef6\u5e76\u5f00\u59cb\u5bfc\u5165\u3002\u4f7f\u7528 mysql \u547d\u4ee4\u884c\u5de5\u5177\uff1a\u8fde\u63a5\u5230\u670d\u52a1\u5668\uff0c\u521b\u5efa\u76ee\u6807\u6570\u636e\u5e93\uff0c\u4f7f\u7528\u547d\u4ee4\u201cmysql [\u6570\u636e\u5e93\u540d\u79f0] <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/28\/2024052815332335725.jpg\" class=\"aligncenter\" title=\"\u600e\u4e48\u628a\u539f\u6709\u7684\u6570\u636e\u5e93\u6587\u4ef6\u5bfc\u5165mysql\u4e2d\u63d2\u56fe\" alt=\"\u600e\u4e48\u628a\u539f\u6709\u7684\u6570\u636e\u5e93\u6587\u4ef6\u5bfc\u5165mysql\u4e2d\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5c06\u539f\u6709\u6570\u636e\u5e93\u6587\u4ef6\u5bfc\u5165 MySQL<\/strong><\/p>\n<p><strong>\u7b2c\u4e00\u6b65\uff1a\u9009\u62e9\u4e00\u79cd\u5bfc\u5165\u65b9\u6cd5<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528 MySQL Workbench\uff1a\u4e00\u79cd\u56fe\u5f62\u5316\u754c\u9762\u5de5\u5177\uff0c\u53ef\u7b80\u5316\u6570\u636e\u5e93\u7ba1\u7406\u3002<\/li>\n<li>\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177 \uff1a\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u4e0a\u8fd0\u884c\u7684\u547d\u4ee4\u884c\u754c\u9762\u3002<\/li>\n<\/ul>\n<p><strong>\u7b2c\u4e8c\u6b65\uff1a\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6<\/strong><\/p>\n<p><strong>\u4f7f\u7528 MySQL Workbench<\/strong><\/p>\n<ol>\n<li>\u6253\u5f00 MySQL Workbench\u3002<\/li>\n<li>\u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668\u3002<\/li>\n<li>\u5bfc\u822a\u5230\u201c\u7ba1\u7406\u201d\u9009\u9879\u5361\u3002<\/li>\n<li>\u5728\u201c\u6570\u636e\u5e93\u201d\u90e8\u5206\uff0c\u53f3\u952e\u5355\u51fb\u8981\u5bfc\u5165\u6570\u636e\u7684\u6570\u636e\u5e93\u3002<\/li>\n<li>\u9009\u62e9\u201c\u5bfc\u5165\u201d\u3002<\/li>\n<li>\u5728\u201c\u6587\u4ef6\u5bfc\u5165\u201d\u7a97\u53e3\u4e2d\uff0c\u9009\u62e9\u539f\u6709\u6570\u636e\u5e93\u6587\u4ef6\uff08.sql\u3001.db\u3001.ibd \u7b49\uff09\u3002<\/li>\n<li>\u5f00\u59cb\u5bfc\u5165\u3002<\/li>\n<\/ol>\n<p><strong>\u4f7f\u7528 mysql \u547d\u4ee4\u884c\u5de5\u5177<\/strong><\/p>\n<ol>\n<li>\u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668\uff1amysql -u [\u7528\u6237\u540d] -p [\u5bc6\u7801]<\/li>\n<li>\u521b\u5efa\u65b0\u6570\u636e\u5e93\uff1aCREATE DATABASE [\u6570\u636e\u5e93\u540d\u79f0];<\/li>\n<li>\u5bfc\u5165\u6570\u636e\uff1amysql [\u6570\u636e\u5e93\u540d\u79f0] <\/li>\n<\/ol>\n<p><strong>\u4f8b\u5982\uff1a<\/strong><\/p>\n<pre>mysql my_database &lt; \/path\/to\/my_database.sql<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u6ce8\u610f\u4e8b\u9879\uff1a<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u539f\u6709\u6570\u636e\u5e93\u6587\u4ef6\u4e0e MySQL \u670d\u52a1\u5668\u7684\u7248\u672c\u517c\u5bb9\u3002<\/li>\n<li>\u5982\u679c\u539f\u6709\u6570\u636e\u5e93\u4e2d\u5305\u542b\u5916\u952e\u7ea6\u675f\uff0c\u8bf7\u786e\u4fdd\u5bfc\u5165\u524d\u5728\u76ee\u6807\u6570\u636e\u5e93\u4e2d\u521b\u5efa\u76f8\u5e94\u7684\u8868\u3002<\/li>\n<li>\u5982\u679c\u51fa\u73b0\u9519\u8bef\uff0c\u8bf7\u68c0\u67e5\u6587\u4ef6\u8def\u5f84\u3001\u6570\u636e\u5e93\u6743\u9650\u548c\u8bed\u6cd5\u3002<\/li>\n<\/ul>\n<\/blockquote>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u628a\u539f\u6709\u7684\u6570\u636e\u5e93\u6587\u4ef6\u5bfc\u5165\u4e2d\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>\u5bfc\u5165 mysql \u6570\u636e\u5e93\u6587\u4ef6\u7684\u65b9\u6cd5\uff1a\u4f7f\u7528 mysql workbench \u56fe\u5f62\u5de5\u5177\uff1a\u6253\u5f00 mysql workbench\uff0c\u8fde\u63a5\u5230\u670d\u52a1\u5668\uff0c\u5728\u7ba1\u7406\u9009\u9879\u5361\u4e2d\u9009\u62e9\u201c\u5bfc\u5165\u201d\uff0c\u9009\u62e9\u6587\u4ef6\u5e76\u5f00\u59cb\u5bfc\u5165\u3002\u4f7f\u7528 mysql \u547d\u4ee4\u884c\u5de5\u5177\uff1a\u8fde\u63a5\u5230\u670d\u52a1\u5668\uff0c\u521b\u5efa\u76ee\u6807\u6570\u636e\u5e93\uff0c\u4f7f\u7528\u547d\u4ee4\u201cmysql [\u6570\u636e\u5e93\u540d\u79f0] \u5c06\u539f\u6709\u6570\u636e\u5e93\u6587\u4ef6\u5bfc\u5165 MySQL \u7b2c\u4e00\u6b65\uff1a\u9009\u62e9\u4e00\u79cd\u5bfc\u5165\u65b9\u6cd5 \u4f7f\u7528 MySQL Workbench\uff1a\u4e00\u79cd\u56fe\u5f62\u5316\u754c\u9762\u5de5\u5177\uff0c\u53ef\u7b80\u5316\u6570\u636e\u5e93\u7ba1\u7406\u3002 \u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177 \uff1a\u5728\u670d\u52a1\u5668\u7ec8\u7aef\u4e0a\u8fd0\u884c\u7684\u547d\u4ee4\u884c\u754c\u9762\u3002 \u7b2c\u4e8c\u6b65\uff1a\u5bfc\u5165\u6570\u636e\u5e93\u6587\u4ef6 \u4f7f\u7528 MySQL Workbench \u6253\u5f00 MySQL Workbench\u3002 \u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668\u3002 \u5bfc\u822a\u5230\u201c\u7ba1\u7406\u201d\u9009\u9879\u5361\u3002 \u5728\u201c\u6570\u636e\u5e93\u201d\u90e8\u5206\uff0c\u53f3\u952e\u5355\u51fb\u8981\u5bfc\u5165\u6570\u636e\u7684\u6570\u636e\u5e93\u3002 \u9009\u62e9\u201c\u5bfc\u5165\u201d\u3002 \u5728\u201c\u6587\u4ef6\u5bfc\u5165\u201d\u7a97\u53e3\u4e2d\uff0c\u9009\u62e9\u539f\u6709\u6570\u636e\u5e93\u6587\u4ef6\uff08.sql\u3001.db\u3001.ibd \u7b49\uff09\u3002 \u5f00\u59cb\u5bfc\u5165\u3002 \u4f7f\u7528 mysql \u547d\u4ee4\u884c\u5de5\u5177 \u8fde\u63a5\u5230 MySQL \u670d\u52a1\u5668\uff1amysql -u [\u7528\u6237\u540d] -p [\u5bc6\u7801] \u521b\u5efa\u65b0\u6570\u636e\u5e93\uff1aCREATE DATABASE [\u6570\u636e\u5e93\u540d\u79f0]; \u5bfc\u5165\u6570\u636e\uff1amysql [\u6570\u636e\u5e93\u540d\u79f0] \u4f8b\u5982\uff1a mysql my_database &lt; \/path\/to\/my_database.sql [&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-5467","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5467","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=5467"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5467\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}