mysql replication複製錯誤(zt)

season0891發表於2009-02-17
 本文轉自:%C3%A5%C2%A4%C2%8D%C3%A5%C2%88%C2%B6%C3%A9%C2%94%C2%99%C3%A8%C2%AF%C2%AF/


Q. No argument was provided to –log-bin, and –log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use ‘–log-bin=mysql-bin’ to avoid this problem.
A: 在my.cnf 的[mysqld]中加入 log-bin=mysql-bin

Q. Neither –relay-log nor –relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use ‘–relay-log=mysql-relay-bin’ to avoid this problem.
A: 在my.cnf 的[mysqld]中加入 relay-log=mysql-relay-bin

Q. [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).
A: 在my.cnf 的[mysqld]中加入 replicate-same-server-id

Q.[Note] Slave I/O thread: connected to master ‘test@:3306′,replication started in log ‘FIRST’ at position 4
[ERROR] Error reading packet from server: Access denied; you need the REPLICATION SLAVE privilege for this operation ( server_errno=1227)
A: 可能原來使用過slave連結.需要將mysql庫中的master.info刪除重新



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-553552/,如需轉載,請註明出處,否則將追究法律責任。

相關文章