<p>MySQL 设定同步 Replication, 将下述命令拆成两组输入, 如下述:</p><pre class="brush:bash;toolbar:false">1.mysql&gt;CHANGEMASTERTOMASTER_HOST=&#39;master.example.com&#39;,MASTER_USER=&#39;repl&#39;,MASTER_PASSWORD=&#39;repl_password&#39;; 2.mysql&gt;CHANGEMASTERTOMASTER_LOG_FILE=&#39;mysql-bin.000001&#39;,MASTER_LOG_POS=107;</pre><p>设定 Replication 完成后, start slave 无法?⒍? 出现下述错误讯息:</p><p>Could not initialize master info structure, more error messages can be found in the MySQL error log</p><p>要怎么解决呢?</p><p>MySQL Replication 出现 Could not initialize master info structure 修复</p><p>MySQL error log 看不出有什么错误讯息, 可看此篇的讨论: MySQL :: Could not initialize master info structure, more error messages can be found in the MySQL error log</p><p>下述直接写解法:</p><p>代码如下<span class="Apple-tab-span" > </span>复制代码</p><pre class="brush:bash;toolbar:false;">1.mysql&gt;resetslave;#重点就是这行 2.mysql&gt;CHANGEMASTERTOMASTER_LOG_FILE=&#39;mysql-bin.000001&#39;,MASTER_LOG_POS=107;#请依照自行环境设定 3.mysql&gt;startslave;#就正常了. 4.重新设置slave,MASTER_LOG_FILE和MASTER_LOG_POS会被清空,所以需要重新设置.</pre>
返回顶部 留言