加入收藏 | 设为首页 | 会员中心 | 我要投稿 51站长网 (https://www.51zhanzhang.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
站内搜索:
当前位置: 首页 > 站长学院 > MySql教程 > 正文

数据库做主从报错

发布时间:2022-03-02 03:00:22 所属栏目:MySql教程 来源:互联网
导读:##我也出了这个错误,看别人的文章解决的 文章原文链接:http://blog.csdn.net/lwei_998/article/details/41210945 在一台主机上增加一个slave,启动的时候报 [ERROR] Slave SQL: Slave failed to initialize relay log info structure from the repository,
      ##我也出了这个错误,看别人的文章解决的
      文章原文链接:http://blog.csdn.net/lwei_998/article/details/41210945
      在一台主机上增加一个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.在my.cnf中添加
relay_log=/db/mysql56/logs/relay_98_3326
 
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;

(编辑:ASP站长)

【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

    相关内容
    未处理完善
      无相关信息
    未处理完善