MySQL replication hung after slave goes offline and comes back online again
- by Ed Manet
I have a master server and several slave servers replicating a single database. I am using in MySQL 5.0 in SLES 11. During fault tolerance testing I found that when the slave's network connection is broken (cable un-plugged) and then restored, replication hangs. It shows no errors and the slave appears to be running but the Read_Master_Log_Pos and Exec_Master_Log_Pos values do not match the log postion on the master server.
The Slave_IO_State is "Waiting for master to send event".
The Slave_IO_Running and Slave_SQL_Running values are both are "Yes".
The Master_Log_File and Relay_Master_Log_File match.
If I stop and start the slave or restart the mysql daemon, replication starts working again.
Any ideas on what I can do about this?