mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_Running: NO ---发现错误 首先查看err日志
Slave_SQL_Running: Yes
2015-07-13 16:33:38 14737 [ERROR] Slave I/O: 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. Error_code: 1593
解决办法:
第一步:查看主从的server_id是否一样
第二步:
查看datadir下的auto.cnf配置文件,发现auto一样,所以报uuid一样的错误
[rootgc1:/var/lib/mysql]$ more auto.cnf
[auto]
server-uuid=dc43ff99-feae-11e4-84f0-08002770780e
[rootgc2:/var/lib/mysql]$ more auto.cnf
[auto]
server-uuid=dc43ff99-feae-11e4-84f0-08002770780e
解决办法:删除某台主机的auto.cnf文件重启mysql服务器,让其重新自动生成一个不一样的auto即可!!
*************************** 1. row ***************************
Slave_IO_Running: NO ---发现错误 首先查看err日志
Slave_SQL_Running: Yes
2015-07-13 16:33:38 14737 [ERROR] Slave I/O: 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. Error_code: 1593
解决办法:
第一步:查看主从的server_id是否一样
master_mysql> show variables like 'server_id';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| server_id | 33 |
+---------------+-------+
slave_mysql> show variables like 'server_id';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| server_id | 11 |
+---------------+-------+
第二步:
查看datadir下的auto.cnf配置文件,发现auto一样,所以报uuid一样的错误
[rootgc1:/var/lib/mysql]$ more auto.cnf
[auto]
server-uuid=dc43ff99-feae-11e4-84f0-08002770780e
[rootgc2:/var/lib/mysql]$ more auto.cnf
[auto]
server-uuid=dc43ff99-feae-11e4-84f0-08002770780e
解决办法:删除某台主机的auto.cnf文件重启mysql服务器,让其重新自动生成一个不一样的auto即可!!
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29096438/viewspace-1778561/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29096438/viewspace-1778561/