MySQL中Last_IO_Errno 1593 server-uuid重复导致slave报错咋整
这篇文章主要介绍MySQL中Last_IO_Errno: 1593 server-uuid重复导致slave报错怎么办,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完! 【问题描述】: 在slave库上发现报错: mysql> SHOW SLAVE STATUS\G ………………………………………… Last_IO_Errno: 1593 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. ………………………………………… 错误提示很明显,master的uuid和slave的uuid相等,uuid必须不一样才能使复制开始生效。 在两个库上分别查看: mysql> SHOW VARIABLES LIKE '%server_%'; +---------------------------------+--------------------------------------+ | Variable_name | Value | +---------------------------------+--------------------------------------+ | innodb_ft_server_stopword_table | | | server_id | 11 | | server_id_bits | 32 | | server_uuid | feac17c0-d55e-11e5-b426-525400079dc4 | +---------------------------------+--------------------------------------+ 4 rows in set (0.00 sec) mysql> SHOW VARIABLES LIKE '%server_%'; +---------------------------------+--------------------------------------+ | Variable_name | Value | +---------------------------------+--------------------------------------+ | innodb_ft_server_stopword_table | | | server_id | 22 | | server_id_bits | 32 | | server_uuid | feac17c0-d55e-11e5-b426-525400079dc4 | +---------------------------------+--------------------------------------+ 4 rows in set (0.00 sec) 产生这个的原因: 拿虚拟机做实验,第一台装好了mysql-server,然后直接拿第一台copy成第二台导致。 导致$datadir/auto.cnf里的内容一致: [auto] server_uuid= xxxxxxxx 【解决方案】: 我的做法是随机拿一个uuid()函数产生的值复制并修改即可: mysql> SELECT uuid(); 不过这个参数是静态的,所以需要重启mysql。 (编辑:银川站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |