线上一个mysql5.6主从复制被操作系统重启弄崩溃了。重新搭建主从复制时,
start slave io_thead;
start slave sql_thread;
之后,show slave status\G 报错:
ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
原因是,从库已经存在之前的relay log
解决方法:
stop slave;
reset slave;
set global gitd_purged='xxxxxx:xxxx';
start slave;
搞定。