码迷,mamicode.com
首页 > 数据库 > 详细

配置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

时间:2020-01-29 00:54:33      阅读:543      评论:0      收藏:0      [点我收藏+]

标签:use   png   art   img   replicat   make   this   service   using   


配置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).

技术图片

? 修改配置文件 sudo vim /usr/my.cnf
? 当时配置从机的时候没改id,应该主机id是1,从机是2

技术图片

? 然后重启MySQL服务

sudo service mysql restart

? 问题解决!

配置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

标签:use   png   art   img   replicat   make   this   service   using   

原文地址:https://www.cnblogs.com/zhqin/p/12239329.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!