今天搭建mysql主从数据库,启动SLAVE,然后查看状态SHOW SLAVE STATUS\G
发现 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
一直没明白是什么问题,最后尝试将 /etc/my.cnf 主从的 server_id都设置成一样的
最后在mysql中执行
mysql> set global server_id=2;
mysql> slave start;
启动成功