当前位置: 移动技术网 > IT编程>数据库>Mysql > master and slave have equal MySQL server UUIDs 解决方法

master and slave have equal MySQL server UUIDs 解决方法

2017年12月12日  | 移动技术网IT编程  | 我要评论

影子部队官网,kaixinseqing,ppady高清电影

使用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即可。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网