{"id":6221,"date":"2024-11-14T12:39:45","date_gmt":"2024-11-14T04:39:45","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6221\/"},"modified":"2024-11-14T12:39:45","modified_gmt":"2024-11-14T04:39:45","slug":"mysql%e9%95%9c%e5%83%8f%e6%95%b0%e6%8d%ae%e5%a6%82%e4%bd%95%e8%bf%81%e7%a7%bb","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6221\/","title":{"rendered":"mysql\u955c\u50cf\u6570\u636e\u5982\u4f55\u8fc1\u79fb"},"content":{"rendered":"<blockquote><p>\n  mysql \u955c\u50cf\u6570\u636e\u8fc1\u79fb\u6b65\u9aa4\u5982\u4e0b\uff1a\u521b\u5efa\u6e90\u6570\u636e\u5e93\u5feb\u7167\u3002\u5728\u76ee\u6807\u7cfb\u7edf\u4e0a\u521b\u5efa\u65b0\u6570\u636e\u5e93\u3002\u5c06\u5feb\u7167\u6587\u4ef6\u590d\u5236\u5230\u76ee\u6807\u7cfb\u7edf\u3002\u4f7f\u7528 mysqlpump \u6216\u5176\u4ed6\u6062\u590d\u5de5\u5177\u6062\u590d\u6570\u636e\u5230\u76ee\u6807\u6570\u636e\u5e93\u3002\u9a8c\u8bc1\u6570\u636e\u5b8c\u6574\u6027\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/15\/2024061514242984156.jpg\" class=\"aligncenter\" title=\"mysql\u955c\u50cf\u6570\u636e\u5982\u4f55\u8fc1\u79fb\u63d2\u56fe\" alt=\"mysql\u955c\u50cf\u6570\u636e\u5982\u4f55\u8fc1\u79fb\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u8fc1\u79fb MySQL \u955c\u50cf\u6570\u636e<\/strong><\/p>\n<p>MySQL \u955c\u50cf\u6570\u636e\u8fc1\u79fb\u662f\u6307\u5c06\u6570\u636e\u4ece\u4e00\u4e2a MySQL \u6570\u636e\u5e93\u5b9e\u4f8b\u590d\u5236\u5230\u53e6\u4e00\u4e2a MySQL \u6570\u636e\u5e93\u5b9e\u4f8b\u3002\u8fd9\u901a\u5e38\u7528\u4e8e\u521b\u5efa\u5907\u4efd\u3001\u6545\u969c\u8f6c\u79fb\u6216\u4e3a\u4e86\u6269\u5c55\u76ee\u7684\u800c\u5c06\u6570\u636e\u590d\u5236\u5230\u53e6\u4e00\u4e2a\u7cfb\u7edf\u4e2d\u3002<\/p>\n<p><strong>\u8fc1\u79fb\u6b65\u9aa4<\/strong><\/p>\n<ol>\n<li> <strong>\u521b\u5efa\u6e90\u6570\u636e\u5e93\u7684\u5feb\u7167<\/strong>\uff1a\u4f7f\u7528\u5feb\u7167\u5de5\u5177\u521b\u5efa\u6e90\u6570\u636e\u5e93\u7684\u5feb\u7167\u3002\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\u6587\u4ef6\u526f\u672c\uff0c\u8be5\u526f\u672c\u53ef\u4ee5\u7528\u4e8e\u8fc1\u79fb\u800c\u4e0d\u4f1a\u5f71\u54cd\u751f\u4ea7\u6570\u636e\u5e93\u3002<\/li>\n<li> <strong>\u5728\u76ee\u6807\u7cfb\u7edf\u4e0a\u521b\u5efa\u65b0\u6570\u636e\u5e93<\/strong>\uff1a\u5728\u76ee\u6807\u7cfb\u7edf\u4e0a\u521b\u5efa\u4e00\u4e2a\u65b0\u6570\u636e\u5e93\uff0c\u5177\u6709\u4e0e\u6e90\u6570\u636e\u5e93\u76f8\u540c\u7684\u67b6\u6784\u548c\u914d\u7f6e\u3002<\/li>\n<li> <strong>\u5c06\u5feb\u7167\u6587\u4ef6\u590d\u5236\u5230\u76ee\u6807\u7cfb\u7edf<\/strong>\uff1a\u5c06\u521b\u5efa\u7684\u5feb\u7167\u6587\u4ef6\u590d\u5236\u5230\u76ee\u6807\u7cfb\u7edf\u4e0a\u7684\u9002\u5f53\u76ee\u5f55\u4e2d\u3002<\/li>\n<li> <strong>\u6062\u590d\u76ee\u6807\u6570\u636e\u5e93<\/strong>\uff1a\u4f7f\u7528 MySQL \u7684 pump \u5de5\u5177\u6216\u5176\u4ed6\u6062\u590d\u5de5\u5177\uff0c\u5c06\u5feb\u7167\u6587\u4ef6\u4e2d\u7684\u6570\u636e\u6062\u590d\u5230\u76ee\u6807\u6570\u636e\u5e93\u4e2d\u3002<\/li>\n<li> <strong>\u9a8c\u8bc1\u6570\u636e\u5b8c\u6574\u6027<\/strong>\uff1a\u4f7f\u7528 checksum \u6216\u5176\u4ed6\u9a8c\u8bc1\u5de5\u5177\u9a8c\u8bc1\u6062\u590d\u540e\u7684\u6570\u636e\u7684\u5b8c\u6574\u6027\uff0c\u4ee5\u786e\u4fdd\u5b83\u4e0e\u6e90\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u5339\u914d\u3002<\/li>\n<\/ol>\n<p><strong>\u4f7f\u7528 MySQL \u7684 mysqlpump \u5de5\u5177<\/strong><\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u7528 MySQL \u7684 mysqlpump \u5de5\u5177\u8fdb\u884c\u8fc1\u79fb\uff1a<\/p>\n<pre>mysqlpump --source=source_host:source_port --source-user=source_user --source-password=source_password --database=source_database --target=target_host:target_port --target-user=target_user --target-password=target_password --target-database=target_database<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>\u5176\u4ed6\u6ce8\u610f\u4e8b\u9879<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u76ee\u6807\u7cfb\u7edf\u7684 MySQL \u7248\u672c\u4e0e\u6e90\u7cfb\u7edf\u517c\u5bb9\u3002<\/li>\n<li>\u5982\u679c\u4f7f\u7528 mysqlpump \u5de5\u5177\uff0c\u8bf7\u786e\u4fdd\u5728\u6e90\u548c\u76ee\u6807\u7cfb\u7edf\u4e0a\u90fd\u5b89\u88c5\u4e86\u5b83\u3002<\/li>\n<li>\u8003\u8651\u4f7f\u7528\u589e\u91cf\u5907\u4efd\u548c\u6062\u590d\u6280\u672f\u4ee5\u51cf\u5c11\u8fc1\u79fb\u65f6\u95f4\u548c\u8d44\u6e90\u6d88\u8017\u3002<\/li>\n<li>\u5728\u8fdb\u884c\u4efb\u4f55\u6570\u636e\u8fc1\u79fb\u4e4b\u524d\uff0c\u59cb\u7ec8\u5c06\u6e90\u6570\u636e\u5e93\u5907\u4efd\u5230\u5355\u72ec\u7684\u4f4d\u7f6e\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u955c\u50cf\u6570\u636e\u5982\u4f55\u8fc1\u79fb\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>mysql \u955c\u50cf\u6570\u636e\u8fc1\u79fb\u6b65\u9aa4\u5982\u4e0b\uff1a\u521b\u5efa\u6e90\u6570\u636e\u5e93\u5feb\u7167\u3002\u5728\u76ee\u6807\u7cfb\u7edf\u4e0a\u521b\u5efa\u65b0\u6570\u636e\u5e93\u3002\u5c06\u5feb\u7167\u6587\u4ef6\u590d\u5236\u5230\u76ee\u6807\u7cfb\u7edf\u3002\u4f7f\u7528 mysqlpump \u6216\u5176\u4ed6\u6062\u590d\u5de5\u5177\u6062\u590d\u6570\u636e\u5230\u76ee\u6807\u6570\u636e\u5e93\u3002\u9a8c\u8bc1\u6570\u636e\u5b8c\u6574\u6027\u3002 \u5982\u4f55\u8fc1\u79fb MySQL \u955c\u50cf\u6570\u636e MySQL \u955c\u50cf\u6570\u636e\u8fc1\u79fb\u662f\u6307\u5c06\u6570\u636e\u4ece\u4e00\u4e2a MySQL \u6570\u636e\u5e93\u5b9e\u4f8b\u590d\u5236\u5230\u53e6\u4e00\u4e2a MySQL \u6570\u636e\u5e93\u5b9e\u4f8b\u3002\u8fd9\u901a\u5e38\u7528\u4e8e\u521b\u5efa\u5907\u4efd\u3001\u6545\u969c\u8f6c\u79fb\u6216\u4e3a\u4e86\u6269\u5c55\u76ee\u7684\u800c\u5c06\u6570\u636e\u590d\u5236\u5230\u53e6\u4e00\u4e2a\u7cfb\u7edf\u4e2d\u3002 \u8fc1\u79fb\u6b65\u9aa4 \u521b\u5efa\u6e90\u6570\u636e\u5e93\u7684\u5feb\u7167\uff1a\u4f7f\u7528\u5feb\u7167\u5de5\u5177\u521b\u5efa\u6e90\u6570\u636e\u5e93\u7684\u5feb\u7167\u3002\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u5e93\u6587\u4ef6\u526f\u672c\uff0c\u8be5\u526f\u672c\u53ef\u4ee5\u7528\u4e8e\u8fc1\u79fb\u800c\u4e0d\u4f1a\u5f71\u54cd\u751f\u4ea7\u6570\u636e\u5e93\u3002 \u5728\u76ee\u6807\u7cfb\u7edf\u4e0a\u521b\u5efa\u65b0\u6570\u636e\u5e93\uff1a\u5728\u76ee\u6807\u7cfb\u7edf\u4e0a\u521b\u5efa\u4e00\u4e2a\u65b0\u6570\u636e\u5e93\uff0c\u5177\u6709\u4e0e\u6e90\u6570\u636e\u5e93\u76f8\u540c\u7684\u67b6\u6784\u548c\u914d\u7f6e\u3002 \u5c06\u5feb\u7167\u6587\u4ef6\u590d\u5236\u5230\u76ee\u6807\u7cfb\u7edf\uff1a\u5c06\u521b\u5efa\u7684\u5feb\u7167\u6587\u4ef6\u590d\u5236\u5230\u76ee\u6807\u7cfb\u7edf\u4e0a\u7684\u9002\u5f53\u76ee\u5f55\u4e2d\u3002 \u6062\u590d\u76ee\u6807\u6570\u636e\u5e93\uff1a\u4f7f\u7528 MySQL \u7684 pump \u5de5\u5177\u6216\u5176\u4ed6\u6062\u590d\u5de5\u5177\uff0c\u5c06\u5feb\u7167\u6587\u4ef6\u4e2d\u7684\u6570\u636e\u6062\u590d\u5230\u76ee\u6807\u6570\u636e\u5e93\u4e2d\u3002 \u9a8c\u8bc1\u6570\u636e\u5b8c\u6574\u6027\uff1a\u4f7f\u7528 checksum \u6216\u5176\u4ed6\u9a8c\u8bc1\u5de5\u5177\u9a8c\u8bc1\u6062\u590d\u540e\u7684\u6570\u636e\u7684\u5b8c\u6574\u6027\uff0c\u4ee5\u786e\u4fdd\u5b83\u4e0e\u6e90\u6570\u636e\u5e93\u4e2d\u7684\u6570\u636e\u5339\u914d\u3002 \u4f7f\u7528 MySQL \u7684 mysqlpump \u5de5\u5177 \u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u4f7f\u7528 MySQL \u7684 mysqlpump \u5de5\u5177\u8fdb\u884c\u8fc1\u79fb\uff1a mysqlpump &#8211;source=source_host:source_port &#8211;source-user=source_user &#8211;source-password=source_password &#8211;database=source_database &#8211;target=target_host:target_port &#8211;target-user=target_user &#8211;target-password=target_password &#8211;target-database=target_database \u767b\u5f55\u540e\u590d\u5236 \u5176\u4ed6\u6ce8\u610f\u4e8b\u9879 \u786e\u4fdd\u76ee\u6807\u7cfb\u7edf\u7684 MySQL \u7248\u672c\u4e0e\u6e90\u7cfb\u7edf\u517c\u5bb9\u3002 \u5982\u679c\u4f7f\u7528 mysqlpump \u5de5\u5177\uff0c\u8bf7\u786e\u4fdd\u5728\u6e90\u548c\u76ee\u6807\u7cfb\u7edf\u4e0a\u90fd\u5b89\u88c5\u4e86\u5b83\u3002 \u8003\u8651\u4f7f\u7528\u589e\u91cf\u5907\u4efd\u548c\u6062\u590d\u6280\u672f\u4ee5\u51cf\u5c11\u8fc1\u79fb\u65f6\u95f4\u548c\u8d44\u6e90\u6d88\u8017\u3002 \u5728\u8fdb\u884c\u4efb\u4f55\u6570\u636e\u8fc1\u79fb\u4e4b\u524d\uff0c\u59cb\u7ec8\u5c06\u6e90\u6570\u636e\u5e93\u5907\u4efd\u5230\u5355\u72ec\u7684\u4f4d\u7f6e\u3002 \u4ee5\u4e0a\u5c31\u662f\u955c\u50cf\u6570\u636e\u5982\u4f55\u8fc1\u79fb\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},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-6221","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6221","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=6221"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6221\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6221"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6221"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6221"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}