Home > Database > Mysql Tutorial > master and slave have equal MySQL server UUIDs 解决方法_MySQL

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

WBOY
Release: 2016-06-01 13:25:19
Original
1327 people have browsed it

bitsCN.com

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

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template