mysql报错1872: Slave failed to initialize relay log info structure from the repository

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

在一台主机上增加一个slave,启动的时候报

[ERROR] Slave SQL: Slave failed to initialize relay log info structure from the repository, Error_code: 1872

原因:检查my.cnf,原来没指定relay_log,mysql默认产生的relay_log名被该server上的另一个mysql slave占用了。

解决方法:

1
2
1.在my.cnf中添加
relay_log=/db/mysql56/logs/relay_98_3326
1
2
3
4
5
6
7
8
9
10
2. reset slave
mysql>reset slave
mysql>change master to
master_host='192.168.0.38',
master_user='repl',
master_password='slave',
master_port=3306,
master_log_file='mysql-bin.001229',
master_log_pos=15970007;
mysql>start slave;

 

原文地址:https://www.cnblogs.com/weifeng1463/p/8682377.html