yxrj 发表于 2020-3-26 10:22:04

MySQL两主(多主)多从架构配置

<h3 id="%E4%B8%80%E3%80%81%E8%A7%92%E8%89%B2%E5%88%92%E5%88%86" name="%E4%B8%80%E3%80%81%E8%A7%92%E8%89%B2%E5%88%92%E5%88%86" style="margin-top: 16px; margin-bottom: 8px; font-size: 14px; box-sizing: border-box; list-style: inherit; color: rgb(0, 0, 0); line-height: 24px; font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">一、角色划分</h3><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">1、MySQL数据库规划</p><blockquote style="box-sizing: border-box; list-style: inherit; margin-bottom: 24px; padding-right: 15px; padding-left: 15px; color: rgb(119, 119, 119); border-left: 4px solid rgb(221, 221, 221); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">我现在的环境是:zhdy04和zhdy05已经做好了主主架构配置,现在需要的是把两台或者多台从服务器与主一一同步。</p></blockquote><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">如果搭建主主环境,参照此链接!</p><div class="table-wrapper" style="margin-top: 12px; margin-bottom: 12px; box-sizing: border-box; list-style: inherit; outline: none; position: relative; overflow-x: auto; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><table style="border-spacing: 0px; box-sizing: border-box; list-style: inherit; width: 734px;"><thead style="box-sizing: border-box; list-style: inherit;"><tr style="box-sizing: border-box; list-style: inherit;"><th style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 230, 240); background-color: rgb(245, 247, 250); color: rgb(103, 116, 137); text-align: left; word-break: keep-all;"><div class="table-header" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">主机名</p></div></th><th style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 230, 240); background-color: rgb(245, 247, 250); color: rgb(103, 116, 137); text-align: left; word-break: keep-all;"><div class="table-header" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">IP 地址</p></div></th><th style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 230, 240); background-color: rgb(245, 247, 250); color: rgb(103, 116, 137); text-align: left; word-break: keep-all;"><div class="table-header" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">角色</p></div></th><th style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border: 1px solid rgb(225, 230, 240); background-color: rgb(245, 247, 250); color: rgb(103, 116, 137); text-align: left; word-break: keep-all;"><div class="table-header" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">Mysql_server_id</p></div></th></tr></thead><tbody style="box-sizing: border-box; list-style: inherit;"><tr style="box-sizing: border-box; list-style: inherit;"><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">zhdy04</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">192.168.230.145</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">masterA</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">145</p></div></td></tr><tr style="box-sizing: border-box; list-style: inherit;"><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">zhdy05</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">192.168.230.146</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">masterB</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">146</p></div></td></tr><tr style="box-sizing: border-box; list-style: inherit;"><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">zhdy06</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">192.168.230.147</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">slaveA</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">147</p></div></td></tr><tr style="box-sizing: border-box; list-style: inherit;"><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">zhdy07</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">192.168.230.148</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">slaveB</p></div></td><td style="padding: 12px 16px; box-sizing: border-box; list-style: inherit; border-color: rgb(225, 230, 240);"><div class="table-cell" style="box-sizing: border-box; list-style: inherit;"><p style="box-sizing: border-box; list-style: inherit; min-height: 24px;">148</p></div></td></tr></tbody></table></div><figure style="box-sizing: border-box; list-style: inherit; margin-top: 16px; margin-bottom: 16px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><div class="image-block" style="box-sizing: border-box; list-style: inherit;"><span style="box-sizing: border-box; list-style: inherit;"></span></div></figure><h3 id="%E4%BA%8C%E3%80%81MySQL%E6%95%B0%E6%8D%AE%E5%90%8C%E6%AD%A5%E8%AE%BE%E5%AE%9A" name="%E4%BA%8C%E3%80%81MySQL%E6%95%B0%E6%8D%AE%E5%90%8C%E6%AD%A5%E8%AE%BE%E5%AE%9A" style="margin-top: 16px; margin-bottom: 8px; font-size: 14px; box-sizing: border-box; list-style: inherit; color: rgb(0, 0, 0); line-height: 24px; font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">二、MySQL数据同步设定</h3><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">1、因为咱们测试的机器数据库全部都是初始值,所以不需要导入任何数据库。(写的原因是假如,配置的环境和现在不一致。我们仍然需要做数据备份和导入)</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">2、数据同步帐号添加</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">按理来说,之前我们已经配置了主主,也就是zhdy04和zhdy05已经互相授权了。接下来我们需要设置的是:</p><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">在zhdy04上面授权zhdy06可以同步。</li><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">在zhdy05上面授权zhdy07可以同步。</li></ol><h4 id="zhdy04-masterA%E6%9C%8D%E5%8A%A1%E5%99%A8%EF%BC%9A" name="zhdy04-masterA%E6%9C%8D%E5%8A%A1%E5%99%A8%EF%BC%9A" style="box-sizing: border-box; list-style: inherit; color: rgb(0, 0, 0); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">zhdy04 masterA服务器:</h4><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> grant replication slave on <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span> to <span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'repl'</span>@<span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'192.168.230.147'</span> identified by <span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'zhangduanya'</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
Query OK<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span> rows <span class="token function" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">affected</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.03</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span>

mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> flush privileges<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
Query OK<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span> rows <span class="token function" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">affected</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.00</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span></pre><h4 id="zhdy05-masterB%E6%9C%8D%E5%8A%A1%E5%99%A8%EF%BC%9A" name="zhdy05-masterB%E6%9C%8D%E5%8A%A1%E5%99%A8%EF%BC%9A" style="box-sizing: border-box; list-style: inherit; color: rgb(0, 0, 0); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">zhdy05 masterB服务器:</h4><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> grant replication slave on <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span> to <span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'repl'</span>@<span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'192.168.230.148'</span> identified by <span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'zhangduanya'</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
Query OK<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span> rows <span class="token function" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">affected</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.03</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span>

mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> flush privileges<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
Query OK<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span> rows <span class="token function" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">affected</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.00</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span></pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">3、数据库配置文件修改</p><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy04 masterA服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">server<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>id<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">145</span>
log<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">2</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span>
log<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>slave<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>updates</pre><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy05 masterB服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">server<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>id<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">146</span>
log<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">2</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">2</span>
log<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>slave<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>updates</pre><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy06 slaveA服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">server<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>id<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">147</span></pre><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy07 slaveB服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">server<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>id<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">148</span></pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">在此我为了让大家更加容易理解我所做的配置,所以没有添加任何附加的服务,例如如下:</p><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">log<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin                                                   #打开二进制功能<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span>MASTER主服务器必须打开此项
binlog<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>format<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>ROW
binlog<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>row<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>p_w_picpath<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>minimal
log<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>slave<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>updates<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token boolean" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">true</span>
gtid<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>mode<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>on
enforce<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>gtid<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>consistency<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token boolean" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">true</span>
master<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>info<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>repository<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>TABLE
relay<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>log<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>info<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>repository<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>TABLE
sync<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>master<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>info<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span>
slave<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>parallel<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>workers<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span>
sync_binlog<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span>
binlog<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>checksum<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>CRC32
master<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>verify<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>checksum<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span>
slave<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>sql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>verify<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>checksum<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span>
binlog<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>rows<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>query<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>log_events<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span>
#expire_logs_days<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">5</span>
max_binlog_size<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>1024M                                                   #binlog单文件最大值

replicate<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>ignore<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>db <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> mysql                                             #忽略不同步主从的数据库
replicate<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>ignore<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>db <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> information_schema
replicate<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>ignore<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>db <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> performance_schema
replicate<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>ignore<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>db <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> test
replicate<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>ignore<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>db <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> zabbix

max_connections <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">3000</span>
max_connect_errors <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">30</span>

skip<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>character<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span><span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">set</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>client<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>handshake                                     #忽略应用程序想要设置的其他字符集
init<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>connect<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'SET NAMES utf8'</span>                                           #连接时执行的SQL
character<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span><span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">set</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>server<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>utf8                                             #服务端默认字符集
wait_timeout<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1800</span>                                                       #请求的最大连接时间
interactive_timeout<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1800</span>                                                #和上一参数同时修改才会生效
sql_mode<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>NO_ENGINE_SUBSTITUTION<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span>STRICT_TRANS_TABLES                     #sql模式

skip<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>name<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>resolve
slow_query_log<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span>
long_query_time <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">6</span>
slow_query_log_file<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>slow<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>query<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span>log
innodb_flush_log_at_trx_commit <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">2</span>
innodb_log_buffer_size <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> 16M


binlog<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span><span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">do</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>db<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>openfire
binlog<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>ignore<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>db<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>mysql<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span>information_schema
replicate<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span><span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">do</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>db<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>openfire
replicate<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>ignore<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>db<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span>mysql<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span>information_schema




read_only <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span>       #开始只读模式
read_only<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>    #关闭只读<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span>可以读写</pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">4、重启4台DB:</p><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;"><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">/</span>etc<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">/</span>init<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span>d<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">/</span>mysqld restart</pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">5、同步设置:</p><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy04 masterA服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> show master status<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
记录下各自的 master_log_file、master_log_pos值

<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> File             <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> Position <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> Binlog_Do_DB <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> Binlog_Ignore_DB <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> Executed_Gtid_Set <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000004</span> <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>      <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">120</span> <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>            <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>                  <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>                   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span>
<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span> row <span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">in</span> <span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">set</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.01</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span></pre><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy05 masterB服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> show master status<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> File             <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> Position <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> Binlog_Do_DB <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> Binlog_Ignore_DB <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> Executed_Gtid_Set <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000004</span> <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>      <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">120</span> <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>            <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>                  <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>                   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span>
<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span> row <span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">in</span> <span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">set</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.00</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span></pre><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy06 slaveA服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> change master to master_host<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'192.168.230.145'</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> master_user<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'repl'</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> master_password<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'zhangduanya'</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> master_log_file<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'mysql-bin.000004'</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> master_log_pos<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">120</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
Query OK<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span> rows affected<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">2</span> <span class="token function" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">warnings</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.04</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span></pre><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy07 slaveB服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> change master to master_host<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'192.168.230.146'</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> master_user<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'repl'</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> master_password<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'zhangduanya'</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> master_log_file<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token string" style="box-sizing: border-box; list-style: inherit; color: rgb(126, 198, 153);">'mysql-bin.000004'</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> master_log_pos<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">120</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
Query OK<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span> rows affected<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">2</span> <span class="token function" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">warnings</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.08</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span></pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">6、检查配置</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">首先一定要把四台的firewalld全部关闭!</p><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;"># systemctl stop firewalld
# systemctl disable firewalld</pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">分别检查四台服务器的</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">Slave_IO_Running: Yes Slave_SQL_Running: Yes</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">开启情况!</p><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy06 slaveA服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> start slave<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
Query OK<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span> rows <span class="token function" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">affected</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.02</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span>

mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> show slave status\G
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span> row <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span>
               Slave_IO_State<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Waiting <span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">for</span> master to send event
                  Master_Host<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">192.168</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">230.145</span>
                  Master_User<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> repl
                  Master_Port<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">3306</span>
                Connect_Retry<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">60</span>
            Master_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000004</span>
          Read_Master_Log_Pos<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">120</span>
               Relay_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> zhdy06<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>relay<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000002</span>
                Relay_Log_Pos<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">283</span>
      Relay_Master_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000004</span>
             Slave_IO_Running<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Yes
            Slave_SQL_Running<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Yes</pre><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy04 masterA服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> start slave<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
Query OK<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span> rows affected<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span> <span class="token function" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">warning</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.00</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span>

mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> show slave status\G
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span> row <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span>
               Slave_IO_State<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Waiting <span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">for</span> master to send event
                  Master_Host<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">192.168</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">230.146</span>
                  Master_User<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> repl
                  Master_Port<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">3306</span>
                Connect_Retry<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">60</span>
            Master_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000004</span>
          Read_Master_Log_Pos<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">120</span>
               Relay_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> zhdy04<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>relay<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000012</span>
                Relay_Log_Pos<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">283</span>
      Relay_Master_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000004</span>
             Slave_IO_Running<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Yes
            Slave_SQL_Running<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Yes</pre><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy07 slaveB服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> start slave<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
Query OK<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span> rows <span class="token function" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">affected</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.02</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span>

mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> show slave status\G
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span> row <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span>
               Slave_IO_State<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Waiting <span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">for</span> master to send event
                  Master_Host<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">192.168</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">230.146</span>
                  Master_User<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> repl
                  Master_Port<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">3306</span>
                Connect_Retry<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">60</span>
            Master_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000004</span>
          Read_Master_Log_Pos<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">120</span>
               Relay_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> zhdy07<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>relay<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000002</span>
                Relay_Log_Pos<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">283</span>
      Relay_Master_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000004</span>
             Slave_IO_Running<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Yes
            Slave_SQL_Running<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Yes</pre><ol class="ol-level-0" style="margin-bottom: 16px; padding-left: 18px; box-sizing: border-box; list-style-position: inherit; list-style-image: inherit; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;"><li style="margin-bottom: 4px; margin-left: 0px; list-style: inherit; box-sizing: border-box;">zhdy05 masterB服务器:</li></ol><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> start slave<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
Query OK<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0</span> rows affected<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">,</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span> <span class="token function" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">warning</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.00</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span>

mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> show slave status\G
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span> row <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">**</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">*</span>
               Slave_IO_State<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Waiting <span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">for</span> master to send event
                  Master_Host<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">192.168</span><span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">.</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">230.145</span>
                  Master_User<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> repl
                  Master_Port<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">3306</span>
                Connect_Retry<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">60</span>
            Master_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000004</span>
          Read_Master_Log_Pos<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">120</span>
               Relay_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> zhdy05<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>relay<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000011</span>
                Relay_Log_Pos<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">283</span>
      Relay_Master_Log_File<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>bin<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">.000004</span>
             Slave_IO_Running<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Yes
            Slave_SQL_Running<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">:</span> Yes</pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">由此看来全部同步成功!</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">7、最后一步,在主服务器zhdy04 masterA创建一个数据库,也就是说这四台服务器都会有这个数据库!</p><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">mysql<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">&gt;</span> show databases<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">;</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> Database         <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> information_schema <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> mysql            <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> performance_schema <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> qqq                <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span> test               <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">|</span>
<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">--</span><span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">+</span>
<span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">5</span> rows <span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">in</span> <span class="token keyword" style="box-sizing: border-box; list-style: inherit; color: rgb(204, 153, 205);">set</span> <span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">(</span><span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">0.06</span> sec<span class="token punctuation" style="box-sizing: border-box; list-style: inherit;">)</span></pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">我就不一一截屏了,然后所有的数据库均有了qqq这个数据库!</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">8、总结</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">也就是说,未来我们搭建多主多从看完这个配置是不是也有思路了?就像配置路由器一样,互相连接的互相授权下是不是就可以了?</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">给大家一个设置的方法:</p><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">10</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span></pre><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">10</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">2</span></pre><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">10</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">3</span></pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">这样是不是就可以设置10台主mysql了呢?</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">但是一旦超过20台呢?或者是100台?</p><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">20台</p><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">20</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span></pre><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">20</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">2</span></pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">…..</p><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">20</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">20</span></pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">100台</p><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">100</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">1</span></pre><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">100</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">2</span></pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">…..</p><pre class="prism-token tokenlanguage-javascript" style="box-sizing: border-box; list-style: inherit; margin-top: 0.5em; margin-bottom: 0.5em; padding: 1em; color: rgb(204, 204, 204); background: rgb(80, 85, 107); border-radius: 3px; overflow: auto; font-family: Consolas, Monaco, &quot;Andale Mono&quot;, &quot;Ubuntu Mono&quot;, monospace; overflow-wrap: normal; word-break: normal; line-height: 1.5; tab-size: 4; hyphens: none;">auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">100</span>
auto<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>increment<span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">-</span>offset   <span class="token operator" style="box-sizing: border-box; list-style: inherit; color: rgb(103, 205, 204);">=</span> <span class="token number" style="box-sizing: border-box; list-style: inherit; color: rgb(240, 141, 73);">100</span></pre><p style="margin-bottom: 8px; box-sizing: border-box; list-style: inherit; min-height: 24px; color: rgb(51, 51, 51); font-family: &quot;pingfang SC&quot;, &quot;helvetica neue&quot;, arial, &quot;hiragino sans gb&quot;, &quot;microsoft yahei ui&quot;, &quot;microsoft yahei&quot;, simsun, sans-serif; white-space: pre-wrap;">是不是就不会重复了? 不难看出,自增长值可设置为主机的数量值即可,但是一定要想到可扩充性,也就是尽量设置这个值大些。</p><p></p>
页: [1]
查看完整版本: MySQL两主(多主)多从架构配置