2011年6月24日 星期五

MySQL Slave 出現Waiting to reconnect after a failed master event read

設定好 MySQL 的 Replication後,在 Slave 執行 show slave status;
看到 Slave_IO_State 出現 Waiting to reconnect after a failed master event read。
查詢到MySQL的 error log ,可看到
[Note] Slave I/O thread: Failed reading log event, reconnecting to retry, log 'mysql-bin.xxx' at postion xxx
[ERROR] Error reading packet from server: Access denied; you need the REPLICATION SLAVE privilege for this operation ( server_errno=1227)

解決方式:
給執行Replication的 user  REPLICATION SLAVE 的權限即可。