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...

在搭建Mysql主从架构过程中,由于从服务器是克隆的主服务器系统,导致主从mysql uuid相同, Slave_IO无法启动,报错如下:

The slave I/O thread stops because master and slave have equal MySQL server UUIDs; these UUIDs must be different for replication to work.

解决办法,修改其中一台服务器的server-uuid,并保证server-uuid的格式正确,修改完成之后重启Mysql服务就可以了。

在修改配置文件之前,先登录Mysql客户端查看uuid,把返回的uuid复制,放到要修改的配置文件即可。

MySQL [hb3]> select uuid();
+--------------------------------------+
| uuid()                               |
+--------------------------------------+
| a39fd903-3a1c-11e8-ab46-000c29133368 |
+--------------------------------------+
1 row in set (0.00 sec)

修改uuid配置文件

# find / -name 'auto.cnf'
# vim /data/mysql/auto.cnf
[auto]
server-uuid=804f2ebe-3a1c-11e8-ab46-000c29133368 # 按照这个16进制格式,修改server-uuid,重启mysql即可

OK,问题解决~

posted @ 2018-01-18 14:44  温柔的风  阅读(5184)  评论(0编辑  收藏  举报