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;