今天在使用mysql是提示ould not initialize master info structure错误,下面我来给各位朋友总结一下解决办法.
MySQL 设定同步 Replication,将下述命令拆成两组输入,如下述:
1.mysql> CHANGE MASTER TO MASTER_HOST='master.example.com', MASTER_USER='repl', MASTER_PASSWORD='repl_password';
2.mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=107;
设定 Replication 完成后,start slave 无法启动,出现下述错误讯息:
Could not initialize master info structure, more error messages can be found in the MySQL error log
要怎么解决呢?
MySQL Replication 出现 Could not initialize master info structure 修复
MySQL error log 看不出有什么错误讯息, 可看此篇的讨论: MySQL :: Could not initialize master info structure, more error messages can be found in the MySQL error log //phpfensi.com
下述直接写解法:
1.mysql> reset slave; # 重点就是这行
2.mysql> CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000001', MASTER_LOG_POS=107; # 请依照自行环境设定
3.mysql> start slave; # 就正常了.
4.?: 重新设置 slave,MASTER_LOG_FILE 和 MASTER_LOG_POS 会被清空,所以需要重新设置. |