今天搭建mysql5.0主从复制报个错
 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).
使用show variables like 'server_id'; 查看,主从server_id设置明显是不一样的,各位帮忙看下是啥原因

解决方案 »

  1.   

    server_id有等于0的吗?
    现在是怎么配置的,my.cnf或my.ini里手动指定一个server-id呢?
      

  2.   

    对master进行配置,包括打开二进制日志,指定唯一的servr ID。例如,在配置文件加入如下值: /etc/my.cnf
    [mysqld]
    server-id=1
    log-bin=mysql-binSlave的配置与master类似:
    [mysqld]
    server-id = 2master,Slave配置后需要重启mysql服务service mysql restart
      

  3.   

    感谢各位的热心回复,上面的方法都试过了,没有用,可能是mysql安装的有问题,卸载重装mysql5.6.13,然后重新配置主从可以了。。