MySQL主从复制报错: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.

报错信息:

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.

image

UUID相同解决办法:

  1. 在主机和从机的mysql下执行show variables like '%server_uuid%';命令查看MySql的uuid值。
  2. 执行find -name auto.cnf命令查看auto.cnf文件的位置。
    image
  3. 执行vim ./www/server/data/auto.cnf命令修改该文件的值(主从机的uuid值不同即可)。
  4. 执行service mysqld restart命令重启主机从机MySQL服务

原因分析

主要原因使用VMware克隆了主机,MySQL只改了配置文件,未更改uuid。

posted @ 2023-02-27 09:58  AnNing21  阅读(635)  评论(0)    收藏  举报