{"id":7090,"date":"2024-11-14T15:55:41","date_gmt":"2024-11-14T07:55:41","guid":{"rendered":"https:\/\/fwq.ai\/blog\/7090\/"},"modified":"2024-11-14T15:55:41","modified_gmt":"2024-11-14T07:55:41","slug":"%e5%a6%82%e4%bd%95%e8%8e%b7%e5%8f%96-mysql-binlog-%e6%96%87%e4%bb%b6%e5%90%8d%e5%92%8c%e5%81%8f%e7%a7%bb%e9%87%8f%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/7090\/","title":{"rendered":"\u5982\u4f55\u83b7\u53d6 MySQL binlog \u6587\u4ef6\u540d\u548c\u504f\u79fb\u91cf\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173043252448876.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u83b7\u53d6 MySQL binlog \u6587\u4ef6\u540d\u548c\u504f\u79fb\u91cf\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u83b7\u53d6 MySQL binlog \u6587\u4ef6\u540d\u548c\u504f\u79fb\u91cf\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u83b7\u53d6  binlog \u6587\u4ef6\u540d\u53ca\u504f\u79fb\u91cf\u7684\u8be6\u7ec6\u65b9\u6cd5<\/strong><\/p>\n<p>\u5728 mysql \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 show master status; \u547d\u4ee4\u83b7\u53d6\u5f53\u524d\u5b9e\u4f8b\u7684 binlog \u6587\u4ef6\u540d\u548c\u504f\u79fb\u91cf\u3002\u8be5\u547d\u4ee4\u5c06\u8fd4\u56de\u4ee5\u4e0b\u7ed3\u679c\uff1a<\/p>\n<pre>file | position | binlog_do_db | binlog_ignore_db\nbinlog.000001 | 107 |  | <\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d\uff0cfile \u5217\u663e\u793a binlog \u6587\u4ef6\u7684\u540d\u79f0\uff0cposition \u5217\u663e\u793a\u504f\u79fb\u91cf\u3002<\/p>\n<p><strong>\u975e\u4ea4\u4e92\u5f0f\u505c\u6b62 mysql slave \u72b6\u6001<\/strong><\/p>\n<p>\u5982\u679c\u4f60\u9700\u8981\u975e\u4ea4\u4e92\u5f0f\u505c\u6b62 mysql slave \u72b6\u6001\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u767b\u5f55\u5230 mysql\u3002<\/li>\n<li>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u505c\u6b62 slave\uff1a<\/li>\n<\/ol>\n<pre>STOP SLAVE;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6267\u884c\u6b64\u547d\u4ee4\u540e\uff0cslave \u72b6\u6001\u5c06\u505c\u6b62\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u83b7\u53d6 MySQL binlog \u6587\u4ef6\u540d\u548c\u504f\u79fb\u91cf\uff1f\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>\u83b7\u53d6 binlog \u6587\u4ef6\u540d\u53ca\u504f\u79fb\u91cf\u7684\u8be6\u7ec6\u65b9\u6cd5 \u5728 mysql \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 show master status; \u547d\u4ee4\u83b7\u53d6\u5f53\u524d\u5b9e\u4f8b\u7684 binlog \u6587\u4ef6\u540d\u548c\u504f\u79fb\u91cf\u3002\u8be5\u547d\u4ee4\u5c06\u8fd4\u56de\u4ee5\u4e0b\u7ed3\u679c\uff1a file | position | binlog_do_db | binlog_ignore_db binlog.000001 | 107 | | \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff0cfile \u5217\u663e\u793a binlog \u6587\u4ef6\u7684\u540d\u79f0\uff0cposition \u5217\u663e\u793a\u504f\u79fb\u91cf\u3002 \u975e\u4ea4\u4e92\u5f0f\u505c\u6b62 mysql slave \u72b6\u6001 \u5982\u679c\u4f60\u9700\u8981\u975e\u4ea4\u4e92\u5f0f\u505c\u6b62 mysql slave \u72b6\u6001\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a \u767b\u5f55\u5230 mysql\u3002 \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u505c\u6b62 slave\uff1a STOP SLAVE; \u767b\u5f55\u540e\u590d\u5236 \u6267\u884c\u6b64\u547d\u4ee4\u540e\uff0cslave \u72b6\u6001\u5c06\u505c\u6b62\u3002 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u83b7\u53d6 MySQL binlog \u6587\u4ef6\u540d\u548c\u504f\u79fb\u91cf\uff1f\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-7090","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7090","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=7090"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7090\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=7090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=7090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=7090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}