[MySQL] MySQL5.7 configure the master-slave replication

Reference links:

  1. LINUX replication from the primary configuration server MYSQL5.7
  2. mysql5.7 master-slave replication principle and basic configuration
  3. MyCat tutorial [mysql Master-slave replication]

View from the library status:

show slave status\G;

Problems encountered:

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

Published 107 original articles · won praise 88 · views 260 000 +

Guess you like

Origin blog.csdn.net/Code_shadow/article/details/102636664