主从复制错误Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MyS

Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the –replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
百度了一下,主要说了两个地方一个是uuid一样。一个是server_id一样。
uuid 文件在auto.cnf /usr/local/mysql/var/auto.cnf 下进行修改。
service_id 可以通过修改配置文件 /etc/myc.cnf. 重启mysql . service mysqld restart 或 /etc/init.d/mysql restart
如果不行,可以进去数据库修改sercvie_id
查看 show variables like ‘server_id’;
修改set global server_id=2;

你可能感兴趣的:(MySQL)