这篇文章主要为大家详细介绍了MySQL主从同步复制错误解决一例,具有一定的参考价值,可以用来参考一下。
感兴趣的小伙伴,下面一起跟随四海网的小编小韵来看看吧!
蚊子今天下午搭了一主三从的mysql复制,结果所有服务器都配置好后,发现从上报如下的错误代码如下:
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).
代码如下:
mysql> show variables like 'server_id';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| server_id | 1 |
+---------------+-------+
1 row in set (0.00 sec)
代码如下:
mysql> set global server_id=2; #此处的数值和my.cnf里设置的一样就行
mysql> slave start;
代码如下:
find / -name "my.cnf"
本文来自:http://www.q1010.com/177/10420-0.html
注:关于MySQL主从同步复制错误解决一例的内容就先介绍到这里,更多相关文章的可以留意四海网的其他信息。
关键词:MYSQL
四海网收集整理一些常用的php代码,JS代码,数据库mysql等技术文章。