Centos7 MySQL8 主从同步提示:Fatal error: The slave I/O thread stops because master and slave have equal

Error message:

  In the process of building the Mysql master-slave architecture, because the slave server is a cloned master server system, the master and slave Mysql uuids are the same, and Slave_IO cannot be started, and the error is as follows:
  Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work.

Solution:

  找到auto.cnf文件,修改里面的uuid值,保证各个db的uuid不一样,重启db即可。

192.168.60.165 main database MySQL uuid view:

[root@localhost etc]# cat /var/lib/mysql/auto.cnf
[auto]
server-uuid=b7c00d21-c484-11e8-a179-000c29a74dda

192.168.60.206 View from the database MySQL uuid:

Value before modification

[root@localhost mysql]# cat /var/lib/mysql/auto.cnf
[auto]
server-uuid=b7c00d21-c484-11e8-a179-000c29a74dda

Modified value

[root@localhost mysql]# cat /var/lib/mysql/auto.cnf
[auto]
server-uuid=b7c00d21-c484-11e8-a179-000c29a74dba

Check whether the MySQL 8 master-slave synchronization still reports an error:

Guess you like

Origin blog.csdn.net/zhouzhiwengang/article/details/112371435