|
|
| Re: replication problem after master crash [message #1189 is a reply to message #1185 ] |
Thu, 03 May 2007 06:11   |
dyker Messages: 3 Registered: May 2007 |
Junior Member |
|
|
| sterin wrote on Thu, 03 May 2007 01:11 | I think you are correct.
For some reason your binary log file is shorter than what the slave is expecting.
You didn't say what happened when the master crashed.
Was it just MySQL or was it the entire OS?
|
It was a server reboot (power problems or smth like this)
| sterin wrote on Thu, 03 May 2007 01:11 |
Either way you have ended up with that the slave is requesting a position in the binary log on the master that is of the end of the file.
So you must perform a re-syncronization between the master and slave to sort this out.
|
JFYI:
I found this in mysql documentation may be it helps somebody else:
| Quote: |
A crash on the master side can result in the master's binary log having a final position less than the most recent position read by the slave, due to the master's binary log file not being flushed. This can cause the slave not to be able to replicate when the master comes back up. Setting sync_binlog=1 in the master my.cnf file helps to minimize this problem because it causes the master to flush its binary log more frequently.
|
I'll try this.
[Updated on: Thu, 03 May 2007 06:34]
|
|
|
|
| Re: replication problem after master crash [message #1503 is a reply to message #1501 ] |
Fri, 29 June 2007 12:15  |
sterin Messages: 324 Registered: March 2007 Location: Sweden |
Senior Member |
|
|
| dyker wrote on Fri, 29 June 2007 17:36 | setting sync_binlog=1 and innodb-safe-binlog=1 doesn't solve this problem.. Any other suggestions?
|
That does not solve your problem that the master and slave is out of sync.
It just minimizes the chance of it occuring again.
As I said you need to resyncronize the master and slave.
Read about it here: http://dev.mysql.com/doc/refman/5.0/en/replication-howto.htm l
Step 3 - 10.
[Updated on: Fri, 29 June 2007 12:16]
|
|
|