【MySQL】MySQL5.7配置主从复制

参考链接:

  1. LINUX服务器MYSQL5.7配置主从复制
  2. mysql5.7主从复制原理及基本配置
  3. MyCat教程【mysql主从复制实现】

查看从库状态:

show slave status\G;

所遇问题:

1、The slave I/O thread stops because master and slave have equal MySQL server UUIDs
解决:

systemctl stop mysqld.service

mv /var/lib/mysql/auto.cnf /var/lib/mysql/auto.cnf.bak

systemctl start mysqld.service

参考:The slave I/O thread stops because master and slave have equal MySQL server UUIDs

2、Got fatal error 1236 from master when reading data from binary log: ‘Could not find first log file name in binary log index file’
解决:

stop slave;

reset slave;

start slave;

参考:Got fatal error 1236 from master when reading data from binary log

发布了107 篇原创文章 · 获赞 88 · 访问量 26万+

猜你喜欢

转载自blog.csdn.net/Code_shadow/article/details/102636664