{"id":27291,"date":"2024-11-24T08:31:19","date_gmt":"2024-11-24T00:31:19","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27291\/"},"modified":"2024-11-24T08:31:19","modified_gmt":"2024-11-24T00:31:19","slug":"mysql-8-0-%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a1%ae%e5%af%bc%e5%85%a5-mysqldump-%e5%af%bc%e5%87%ba%e7%9a%84%e6%95%b0%e6%8d%ae%ef%bc%9f-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27291\/","title":{"rendered":"MySQL 8.0 \u5982\u4f55\u6b63\u786e\u5bfc\u5165 mysqldump \u5bfc\u51fa\u7684\u6570\u636e\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173122509053257.jpg\" class=\"aligncenter\" title=\"MySQL 8.0 \u5982\u4f55\u6b63\u786e\u5bfc\u5165 mysqldump \u5bfc\u51fa\u7684\u6570\u636e\uff1f\u63d2\u56fe\" alt=\"MySQL 8.0 \u5982\u4f55\u6b63\u786e\u5bfc\u5165 mysqldump \u5bfc\u51fa\u7684\u6570\u636e\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u89e3\u51b3  8.0 mysqldump \u5bfc\u5165\u65e0\u6548\u95ee\u9898<\/strong><\/p>\n<p>\u60a8\u9047\u5230\u7684 mysqldump \u5bfc\u5165\u65e0\u6548\u95ee\u9898\u53ef\u80fd\u662f\u547d\u4ee4\u9519\u8bef\u5bfc\u81f4\u7684\u3002\u60a8\u4f7f\u7528\u7684\u662f\u5bfc\u51fa\u547d\u4ee4 mysqldump\uff0c\u4f46\u8bd5\u56fe\u6267\u884c\u5bfc\u5165\u64cd\u4f5c\u3002<\/p>\n<p><strong>\u6b63\u786e\u5bfc\u5165\u547d\u4ee4<\/strong><\/p>\n<p>\u6b63\u786e\u7684 mysql \u5bfc\u5165\u547d\u4ee4\u4e3a\uff1a<\/p>\n<pre>mysql -uroot -p123456 -h127.0.0.1 -P8082 test &lt; \/erp\/sql\/test.sql<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d\uff1a<\/p>\n<ul>\n<li>mysql \u662f\u5bfc\u5165\u547d\u4ee4<\/li>\n<li>-u \u6307\u5b9a\u7528\u6237\u540d<\/li>\n<li>-p \u6307\u5b9a\u5bc6\u7801<\/li>\n<li>-h \u6307\u5b9a\u4e3b\u673a\u5730\u5740<\/li>\n<li>-p \u6307\u5b9a\u7aef\u53e3\u53f7<\/li>\n<li>test \u662f\u76ee\u6807\u6570\u636e\u5e93\u540d\u79f0<\/li>\n<li> <\/li>\n<\/ul>\n<p><strong>\u5bfc\u51fa\u548c\u5bfc\u5165\u7684<\/strong><\/p>\n<ul>\n<li> <strong>mysqldump:<\/strong> \u5c06\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u5bfc\u51fa\u4e3a sql \u6587\u4ef6\uff0c\u7528\u4e8e\u5907\u4efd\u6216\u8fc1\u79fb\u3002<\/li>\n<li> <strong>mysql:<\/strong> \u4f7f\u7528\u5bfc\u51fa\u7684 sql \u6587\u4ef6\u5bfc\u5165\u6570\u636e\u5230\u73b0\u6709\u6570\u636e\u5e93\u6216\u521b\u5efa\u65b0\u6570\u636e\u5e93\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662fMySQL 8.0 \u5982\u4f55\u6b63\u786e\u5bfc\u5165 dump \u5bfc\u51fa\u7684\u6570\u636e\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u51b3 8.0 mysqldump \u5bfc\u5165\u65e0\u6548\u95ee\u9898 \u60a8\u9047\u5230\u7684 mysqldump \u5bfc\u5165\u65e0\u6548\u95ee\u9898\u53ef\u80fd\u662f\u547d\u4ee4\u9519\u8bef\u5bfc\u81f4\u7684\u3002\u60a8\u4f7f\u7528\u7684\u662f\u5bfc\u51fa\u547d\u4ee4 mysqldump\uff0c\u4f46\u8bd5\u56fe\u6267\u884c\u5bfc\u5165\u64cd\u4f5c\u3002 \u6b63\u786e\u5bfc\u5165\u547d\u4ee4 \u6b63\u786e\u7684 mysql \u5bfc\u5165\u547d\u4ee4\u4e3a\uff1a mysql -uroot -p123456 -h127.0.0.1 -P8082 test &lt; \/erp\/sql\/test.sql \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff1a mysql \u662f\u5bfc\u5165\u547d\u4ee4 -u \u6307\u5b9a\u7528\u6237\u540d -p \u6307\u5b9a\u5bc6\u7801 -h \u6307\u5b9a\u4e3b\u673a\u5730\u5740 -p \u6307\u5b9a\u7aef\u53e3\u53f7 test \u662f\u76ee\u6807\u6570\u636e\u5e93\u540d\u79f0 \u5bfc\u51fa\u548c\u5bfc\u5165\u7684 mysqldump: \u5c06\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u5bfc\u51fa\u4e3a sql \u6587\u4ef6\uff0c\u7528\u4e8e\u5907\u4efd\u6216\u8fc1\u79fb\u3002 mysql: \u4f7f\u7528\u5bfc\u51fa\u7684 sql \u6587\u4ef6\u5bfc\u5165\u6570\u636e\u5230\u73b0\u6709\u6570\u636e\u5e93\u6216\u521b\u5efa\u65b0\u6570\u636e\u5e93\u3002 \u4ee5\u4e0a\u5c31\u662fMySQL 8.0 \u5982\u4f55\u6b63\u786e\u5bfc\u5165 dump \u5bfc\u51fa\u7684\u6570\u636e\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/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-27291","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27291","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=27291"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27291\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}