mysql5.7启动slave报错 ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
原因:检查my.cnf,原来没指定relay_log,mysql默认产生的relay_log名被该server上的另一个mysql slave占用了。
解决方法:
1.在my.cnf中添加
relay_log = /usr/local/mysql/log/relay.log
2. reset slave
mysql> reset slave; mysql> change master to -> master_host='192.168.0.11', -> master_user='rep', -> master_password='VkNI%5%-p,0^)s~'; Query OK, 0 rows affected, 2 warnings (0.19 sec) mysql> start slave; Query OK, 0 rows affected (0.03 sec) mysql> show slave status\G;