{"id":7050,"date":"2024-11-14T14:33:28","date_gmt":"2024-11-14T06:33:28","guid":{"rendered":"https:\/\/fwq.ai\/blog\/7050\/"},"modified":"2024-11-14T14:33:28","modified_gmt":"2024-11-14T06:33:28","slug":"%e5%a6%82%e4%bd%95%e8%8e%b7%e5%8f%96-mysql-%e5%ae%9e%e4%be%8b%e7%9a%84-binlog-%e6%96%87%e4%bb%b6%e5%92%8c%e5%81%8f%e7%a7%bb%e9%87%8f%e5%b9%b6%e5%81%9c%e6%ad%a2-slave-%e7%8a%b6%e6%80%81%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/7050\/","title":{"rendered":"\u5982\u4f55\u83b7\u53d6 MySQL \u5b9e\u4f8b\u7684 Binlog \u6587\u4ef6\u548c\u504f\u79fb\u91cf\u5e76\u505c\u6b62 Slave \u72b6\u6001\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173035783320639.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u83b7\u53d6 MySQL \u5b9e\u4f8b\u7684 Binlog \u6587\u4ef6\u548c\u504f\u79fb\u91cf\u5e76\u505c\u6b62 Slave \u72b6\u6001\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u83b7\u53d6 MySQL \u5b9e\u4f8b\u7684 Binlog \u6587\u4ef6\u548c\u504f\u79fb\u91cf\u5e76\u505c\u6b62 Slave \u72b6\u6001\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u83b7\u53d6  \u5b9e\u4f8b\u7684 binlog \u6587\u4ef6\u548c\u504f\u79fb\u91cf\u4ee5\u53ca\u505c\u6b62 slave \u72b6\u6001<\/strong><\/p>\n<p>\u60f3\u8981\u83b7\u53d6 mysql \u5b9e\u4f8b\u5f53\u524d binlog \u6587\u4ef6\u53ca\u5176\u504f\u79fb\u91cf\uff0c\u53ef\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a<\/p>\n<pre>show master status;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u6267\u884c\u8be5\u547d\u4ee4\u5c06\u8fd4\u56de\u7c7b\u4f3c\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<table>\n<thead>\n<tr>\n<th>file<\/th>\n<th>position<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>binlog.000001<\/td>\n<td>107<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u5176\u4e2d\uff0cfile \u5217\u8868\u793a\u5f53\u524d binlog \u6587\u4ef6\u7684\u540d\u79f0\uff0cposition \u5217\u8868\u793a\u5f53\u524d binlog \u6587\u4ef6\u7684\u504f\u79fb\u91cf\u3002<\/p>\n<p>\u800c\u8981\u505c\u6b62 mysql slave \u72b6\u6001\uff0c\u53ef\u4ee5\u901a\u8fc7\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>STOP SLAVE;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u9700\u8981\u6ce8\u610f\uff0c\u6b64\u547d\u4ee4\u5fc5\u987b\u5728\u8fde\u63a5\u5230 mysql slave \u5b9e\u4f8b\u65f6\u6267\u884c\u3002\u5b83\u5c06\u505c\u6b62\u4ece mysql \u4e3b\u5b9e\u4f8b\u590d\u5236\u6570\u636e\u7684 slave \u7ebf\u7a0b\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u83b7\u53d6 MySQL \u5b9e\u4f8b\u7684 Binlog \u6587\u4ef6\u548c\u504f\u79fb\u91cf\u5e76\u505c\u6b62 Slave \u72b6\u6001\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>\u5982\u4f55\u83b7\u53d6 \u5b9e\u4f8b\u7684 binlog \u6587\u4ef6\u548c\u504f\u79fb\u91cf\u4ee5\u53ca\u505c\u6b62 slave \u72b6\u6001 \u60f3\u8981\u83b7\u53d6 mysql \u5b9e\u4f8b\u5f53\u524d binlog \u6587\u4ef6\u53ca\u5176\u504f\u79fb\u91cf\uff0c\u53ef\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a show master status; \u767b\u5f55\u540e\u590d\u5236 \u6267\u884c\u8be5\u547d\u4ee4\u5c06\u8fd4\u56de\u7c7b\u4f3c\u4ee5\u4e0b\u5185\u5bb9\uff1a file position binlog.000001 107 \u5176\u4e2d\uff0cfile \u5217\u8868\u793a\u5f53\u524d binlog \u6587\u4ef6\u7684\u540d\u79f0\uff0cposition \u5217\u8868\u793a\u5f53\u524d binlog \u6587\u4ef6\u7684\u504f\u79fb\u91cf\u3002 \u800c\u8981\u505c\u6b62 mysql slave \u72b6\u6001\uff0c\u53ef\u4ee5\u901a\u8fc7\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a STOP SLAVE; \u767b\u5f55\u540e\u590d\u5236 \u9700\u8981\u6ce8\u610f\uff0c\u6b64\u547d\u4ee4\u5fc5\u987b\u5728\u8fde\u63a5\u5230 mysql slave \u5b9e\u4f8b\u65f6\u6267\u884c\u3002\u5b83\u5c06\u505c\u6b62\u4ece mysql \u4e3b\u5b9e\u4f8b\u590d\u5236\u6570\u636e\u7684 slave \u7ebf\u7a0b\u3002 \u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u83b7\u53d6 MySQL \u5b9e\u4f8b\u7684 Binlog \u6587\u4ef6\u548c\u504f\u79fb\u91cf\u5e76\u505c\u6b62 Slave \u72b6\u6001\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-7050","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7050","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=7050"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7050\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=7050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=7050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=7050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}