主从相同时 ,出现从库不能io线程不能同步,show slave status:
Fatal error: The slave I/O thread stops because master and slavehave 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 doesnot always make sense; please check the manual before using it).
正如上面所说,可以配置--replicate-same-server-id,但是如果配置这个选项就不能配置--slave-log-updates,因为这样可能会导致内循环,如下:
using --replicate-same-server-id in conjunction with--log-slave-updates is impossible, it would lead to infinite loops in thisserver.
从和从相同:
从服务器的io线程总是在这个之间切换,两个从库的io线程轮流争抢主库连接。
Queueing master event to the relay log和 Waiting toreconnect after a failed master event read。
错误日志中循环出现
120810 16:12:53 [Note] Slave: rec