码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2018-03-31 15:55:06      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:logs   syntax   err   原来   containe   add   ble   div   一个   

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

标签:logs   syntax   err   原来   containe   add   ble   div   一个   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!