{"id":6538,"date":"2024-11-14T13:50:12","date_gmt":"2024-11-14T05:50:12","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6538\/"},"modified":"2024-11-14T13:50:12","modified_gmt":"2024-11-14T05:50:12","slug":"mysql%e6%95%b0%e6%8d%ae%e5%ba%93%e6%80%8e%e4%b9%88%e5%af%bc%e5%87%ba%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6538\/","title":{"rendered":"mysql\u6570\u636e\u5e93\u600e\u4e48\u5bfc\u51fa\u4ee3\u7801"},"content":{"rendered":"<blockquote><p>\n  \u5bfc\u51fa mysql \u6570\u636e\u5e93\u4ee3\u7801\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177 mysqldump\uff0c\u4f8b\u5982\uff1amysqldump -u \u7528\u6237\u540d -p \u5bc6\u7801 \u6570\u636e\u5e93\u540d\u79f0 &gt; \u5bfc\u51fa\u6587\u4ef6.sql\uff1b\u4f7f\u7528\u56fe\u5f62\u5316\u5de5\u5177 mysql workbench\uff0c\u901a\u8fc7\u53f3\u952e\u5355\u51fb\u6570\u636e\u5e93\u540d\u79f0\u5e76\u9009\u62e9\u201c\u5bfc\u51fa\u201d\u8fdb\u884c\u64cd\u4f5c\uff1b\u4f7f\u7528\u57fa\u4e8e web \u7684\u5de5\u5177 phpmyadmin\uff0c\u901a\u8fc7\u767b\u5f55\u3001\u9009\u62e9\u6570\u636e\u5e93\u3001\u5355\u51fb\u201c\u5bfc\u51fa\u201d\u5e76\u9009\u62e9\u201c\u81ea\u5b9a\u4e49\u201d\u64cd\u4f5c\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202408\/05\/2024080520012945338.jpg\" class=\"aligncenter\" title=\"mysql\u6570\u636e\u5e93\u600e\u4e48\u5bfc\u51fa\u4ee3\u7801\u63d2\u56fe\" alt=\"mysql\u6570\u636e\u5e93\u600e\u4e48\u5bfc\u51fa\u4ee3\u7801\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 MySQL \u6570\u636e\u5e93\u4e2d\u5bfc\u51fa\u4ee3\u7801<\/strong><\/p>\n<p>MySQL \u6570\u636e\u5e93\u5bfc\u51fa\u4ee3\u7801\u662f\u4e00\u79cd\u5c06\u6570\u636e\u5e93\u7ed3\u6784\u548c\u6570\u636e\u5907\u4efd\u6216\u4f20\u8f93\u5230\u53e6\u4e00\u4e2a\u4f4d\u7f6e\u7684\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5728 MySQL \u6570\u636e\u5e93\u4e2d\u5bfc\u51fa\u4ee3\u7801\uff1a<\/p>\n<p><strong>1. \u4f7f\u7528 dump \u5b9e\u7528\u7a0b\u5e8f<\/strong><\/p>\n<p>mysqldump \u662f\u4e00\u4e2a\u7528\u4e8e\u5bfc\u51fa MySQL \u6570\u636e\u5e93\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u5bfc\u51fa\u6570\u636e\u5e93\uff1a<\/p>\n<pre>mysqldump -u \u7528\u6237\u540d -p \u5bc6\u7801 \u6570\u636e\u5e93\u540d\u79f0 &gt; \u5bfc\u51fa\u6587\u4ef6.sql<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f8b\u5982\uff1a<\/p>\n<pre>mysqldump -u root -p my_database &gt; my_database.sql<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>2. \u4f7f\u7528 MySQL Workbench<\/strong><\/p>\n<p>MySQL Workbench \u662f\u4e00\u4e2a\u56fe\u5f62\u5316\u5de5\u5177\uff0c\u7528\u4e8e\u7ba1\u7406 MySQL \u6570\u636e\u5e93\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\u4ece MySQL Workbench \u5bfc\u51fa\u4ee3\u7801\uff1a<\/p>\n<ul>\n<li>\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002<\/li>\n<li>\u53f3\u952e\u5355\u51fb\u6570\u636e\u5e93\u540d\u79f0\u5e76\u9009\u62e9\u201c\u5bfc\u51fa\u201d\u3002<\/li>\n<li>\u9009\u62e9\u201c\u81ea\u5b9a\u4e49\u5bfc\u51fa\u201d\u9009\u9879\u3002<\/li>\n<li>\u5728\u201c\u5bfc\u51fa\u7684\u8868\u201d\u9009\u9879\u5361\u4e2d\uff0c\u9009\u62e9\u8981\u5bfc\u51fa\u7684\u8868\u3002<\/li>\n<li>\u5728\u201c\u5bfc\u51fa\u9009\u9879\u201d\u9009\u9879\u5361\u4e2d\uff0c\u9009\u62e9\u201c\u7ed3\u6784\u548c\u6570\u636e\u201d\u5e76\u8bbe\u7f6e\u5176\u4ed6\u9009\u9879\u3002<\/li>\n<li>\u5355\u51fb\u201c\u5f00\u59cb\u201d\u6309\u94ae\u5f00\u59cb\u5bfc\u51fa\u3002<\/li>\n<\/ul>\n<p><strong>3. \u4f7f\u7528 phpMyAdmin<\/strong><\/p>\n<p>phpMyAdmin \u662f\u4e00\u4e2a\u57fa\u4e8e Web \u7684\u5de5\u5177\uff0c\u7528\u4e8e\u7ba1\u7406 MySQL \u6570\u636e\u5e93\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\u4ece phpMyAdmin \u5bfc\u51fa\u4ee3\u7801\uff1a<\/p>\n<ul>\n<li>\u767b\u5f55\u5230 phpMyAdmin\u3002<\/li>\n<li>\u9009\u62e9\u8981\u5bfc\u51fa\u7684\u6570\u636e\u5e93\u3002<\/li>\n<li>\u5728\u9876\u90e8\u83dc\u5355\u4e2d\uff0c\u5355\u51fb\u201c\u5bfc\u51fa\u201d\u3002<\/li>\n<li>\u9009\u62e9\u201c\u81ea\u5b9a\u4e49\u201d\u9009\u9879\u3002<\/li>\n<li>\u9009\u62e9\u201c\u7ed3\u6784\u548c\u6570\u636e\u201d\u5e76\u8bbe\u7f6e\u5176\u4ed6\u9009\u9879\u3002<\/li>\n<li>\u5355\u51fb\u201c\u8f6c\u50a8\u201d\u6309\u94ae\u5f00\u59cb\u5bfc\u51fa\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u6570\u636e\u5e93\u600e\u4e48\u5bfc\u51fa\u4ee3\u7801\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\u51fa mysql \u6570\u636e\u5e93\u4ee3\u7801\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177 mysqldump\uff0c\u4f8b\u5982\uff1amysqldump -u \u7528\u6237\u540d -p \u5bc6\u7801 \u6570\u636e\u5e93\u540d\u79f0 &gt; \u5bfc\u51fa\u6587\u4ef6.sql\uff1b\u4f7f\u7528\u56fe\u5f62\u5316\u5de5\u5177 mysql workbench\uff0c\u901a\u8fc7\u53f3\u952e\u5355\u51fb\u6570\u636e\u5e93\u540d\u79f0\u5e76\u9009\u62e9\u201c\u5bfc\u51fa\u201d\u8fdb\u884c\u64cd\u4f5c\uff1b\u4f7f\u7528\u57fa\u4e8e web \u7684\u5de5\u5177 phpmyadmin\uff0c\u901a\u8fc7\u767b\u5f55\u3001\u9009\u62e9\u6570\u636e\u5e93\u3001\u5355\u51fb\u201c\u5bfc\u51fa\u201d\u5e76\u9009\u62e9\u201c\u81ea\u5b9a\u4e49\u201d\u64cd\u4f5c\u3002 \u5982\u4f55\u5728 MySQL \u6570\u636e\u5e93\u4e2d\u5bfc\u51fa\u4ee3\u7801 MySQL \u6570\u636e\u5e93\u5bfc\u51fa\u4ee3\u7801\u662f\u4e00\u79cd\u5c06\u6570\u636e\u5e93\u7ed3\u6784\u548c\u6570\u636e\u5907\u4efd\u6216\u4f20\u8f93\u5230\u53e6\u4e00\u4e2a\u4f4d\u7f6e\u7684\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u5982\u4f55\u5728 MySQL \u6570\u636e\u5e93\u4e2d\u5bfc\u51fa\u4ee3\u7801\uff1a 1. \u4f7f\u7528 dump \u5b9e\u7528\u7a0b\u5e8f mysqldump \u662f\u4e00\u4e2a\u7528\u4e8e\u5bfc\u51fa MySQL \u6570\u636e\u5e93\u7684\u547d\u4ee4\u884c\u5de5\u5177\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u8bed\u6cd5\u5bfc\u51fa\u6570\u636e\u5e93\uff1a mysqldump -u \u7528\u6237\u540d -p \u5bc6\u7801 \u6570\u636e\u5e93\u540d\u79f0 &gt; \u5bfc\u51fa\u6587\u4ef6.sql \u767b\u5f55\u540e\u590d\u5236 \u4f8b\u5982\uff1a mysqldump -u root -p my_database &gt; my_database.sql \u767b\u5f55\u540e\u590d\u5236 2. \u4f7f\u7528 MySQL Workbench MySQL Workbench [&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-6538","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6538","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=6538"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6538\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}