配置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:07:17


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

  问题解决!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!