1. 程式人生 > >MySQL報錯ERROR1872(HY000):Slave failed to initialize

MySQL報錯ERROR1872(HY000):Slave failed to initialize

MySQL報錯ERROR1872

ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository


MySQL 5.6修復從庫復制時報錯

mysql> start slave;

ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository


報錯原因:

從庫已經存在之前的relay log


解決方法:

使用RESET SLAVE語句,清除master信息和relay日誌的信息,刪除所有的relay日誌文件,並開始創建一個全新的中繼日誌

mysql> stop slave;

mysql> reset slave;


MySQL報錯ERROR1872(HY000):Slave failed to initialize