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 slavemysql>reset slavemysql>change master tomaster_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;
|
本文介绍了一个 MySQL Slave 在初始化 Relay Log 时遇到错误 1872 的问题及解决方案。原因是未指定 relay_log 导致默认名称冲突。通过在 my.cnf 中指定唯一的 relay_log 路径,并执行 reset slave 和重新配置 Master-Slave 同步来解决问题。
5722

被折叠的 条评论
为什么被折叠?



