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
下述直接寫解法:
代碼如下 復制代碼 1.mysql> reset slave; # 重點就是這行4.?: 重新設置 slave, MASTER_LOG_FILE 和 MASTER_LOG_POS 會被清空, 所以需要重新設置.