我在两台Windows Server 2003 上做两个MySQL数据库的同步,配置如下:
在A机的my.ini的[mysqld]下添加如下配置
server-id = 1
log-bin = D:\mysql\log-bin.log
binlog-do-db=scs在B机的my.ini的[mysqld]下添加如下配置
server-id=2
master-host=192.168.1.123
master-user=scs
master-password=1234master-port = 3306replicate-do-db = scs
binlog-ignore-db = mysql在B机执行salve start;同步不成功
错误日志如下:
080311 14:47:11 [Note] Slave I/O thread: connected to master '[email protected]:3306',  replication started in log 'FIRST' at position 4
080311 14:47:11 [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).
080311 14:47:11 [Note] Slave I/O thread exiting, read up to log 'FIRST', position 4
谢谢高手指点!