首页>>帮助中心>>香港服务器master and slave have equal MySQL server UUIDs 解决方法

香港服务器master and slave have equal MySQL server UUIDs 解决方法

2025/8/26 46次
 香港服务器master and slave have equal MySQL server UUIDs 解决方法


 使用rsync配置了大量mysql,省去了大量编译和配置的时间,随逐个修改master和slave服务器的my.cnf,后,发现数据不能同步,  
 在slave服务器show slave status:

 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.

 首先检查:  
 mysql> show variables like ‘server_id';  
 +—————+——-+  
 | Variable_name | Value |  
 +—————+——-+  
 | server_id | 3 |  
 +—————+——-+

 主从并不一样,排除该问题。

 继续排查,找到原因在于,拷贝整个data目录,把auto.cnf文件也拷贝过来了,里面记录了数据库的uuid,每个库的uuid应该是不一样的。

 [auto]  
 server-uuid=6dcee5be-8cdb-11e2-9408-90e2ba2e2ea6

 解决办法?按照这个16进制格式,随便改下,重启mysql即可。

版权声明

    声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们996811936@qq.com进行处理。