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

报错信息:

  在搭建Mysql主从架构过程中,由于从服务器是克隆的主服务器系统,导致主从Mysql uuid相同, Slave_IO无法启动,报错如下:
  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.

解决方法:

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

192.168.60.165 主库MySQL uuid 查看:

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

192.168.60.206 从库MySQL uuid 查看:

修改前的值

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

修改后的值

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

查看MySQL 8 主从同步是否还报错:

Centos7 MySQL8 主从同步提示:Fatal error: The slave I/O thread stops because master and slave have equal_第1张图片

你可能感兴趣的:(CentOS,随手笔记)