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

Posted Oops!

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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;

 

以上是关于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(示例(代

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

mysql 主从关系ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repositor

MySQL复制报错(Slave failed to initialize relay log info structure from the repository)

Mysql slave 主从同步异常处理 Error:1872

使用mysqldump 备份 恢复从库报错解决方案(ERROR 1872)