mysql主从复制错误:A slave with the same server_uuid/server_id as this slave has connected to the master;

十年热恋 提交于 2019-12-01 02:35:32

A slave with the same server_uuid/server_id as this slave has connected to the   master;

有一个slave和这个slave有相同的server_uuid或server_id,已经连接了master。即存在两个或两个以上slave的server_uuid或server_id相同

 

 

 这种情况下请检查从库是否存在相同的server_id/server_uuid

show variables like '%server%id%';

 

 如果server_id相同,请修改/etc/my.cnf中server_id的配置

 如果server_uuid相同,请删除auto.cnf文件,然后重启数据库,数据库会重新生成server_uuid和auto.cnf文件

 我出现这个问题是因为克隆了从库所在的虚拟机,于是克隆的从库和原来的从库server_id和server_uuid都相同,于是出现了上述问题

 

参考地址 :

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!