MySQL Forums
Forum List  »  Replication

Re: Restarting Slave After Master Crash
Posted by: Ian Rimmer
Date: June 05, 2006 07:31PM

Hi,

I have a similar problem, more complicated setup:
I have:

1 32bit 4.0.18-log master
2 32bit 4.0.18-log slaves
1 64bit 5.0.18-log slave (many more of these coming)

When the master's mysql process is restarted (I presume the same or similar will happen if the link fails) it starts a new log file same as the above, in my case the 2 32 bit slaves running the same mysql version catch up rigth away. The 64bit version 5 slave does not tho (Slave_IO_Running: No).

A "slave stop;slave start" is all it takes to get things going again, but it's a manual step that has to be taken.

Anyone got any ideas why this might happen and where I can look to fix?

Thanks
Ian

before restart:

*************************** 1. row ***************************
File: mysql-bin.004
Position: 512
Binlog_do_db:
Binlog_ignore_db:
1 row in set (0.00 sec)

*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: master
Master_User: user
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.004
Read_Master_Log_Pos: 512
Relay_Log_File: slave-relay-bin.000007
Relay_Log_Pos: 650
Relay_Master_Log_File: mysql-bin.004
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB: repl.db1
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 512
Relay_Log_Space: 650
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
1 row in set (0.00 sec)

After mysql restart on the master:(master has new values, slave hasn't changed, just IO has died)

*************************** 1. row ***************************
File: mysql-bin.005
Position: 79
Binlog_do_db:
Binlog_ignore_db:
1 row in set (0.00 sec)

*************************** 1. row ***************************
Slave_IO_State: Reconnecting after a failed master event read
Master_Host: master
Master_User: user
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.004
Read_Master_Log_Pos: 512
Relay_Log_File: slave-relay-bin.000007
Relay_Log_Pos: 650
Relay_Master_Log_File: mysql-bin.004
Slave_IO_Running: No
Slave_SQL_Running: Yes
Replicate_Do_DB: maildb
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 512
Relay_Log_Space: 650
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
1 row in set (0.00 sec)

After "stop slave;start slave" on 64bit slave: (IO is running, Log_Pos has caught up)

*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: homail.sandown.co.za
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.005
Read_Master_Log_Pos: 423
Relay_Log_File: constmail-relay-bin.000009
Relay_Log_Pos: 559
Relay_Master_Log_File: mysql-bin.005
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB: maildb
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 423
Relay_Log_Space: 559
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
1 row in set (0.00 sec)

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Restarting Slave After Master Crash
8801
June 05, 2006 07:31PM
6205
October 19, 2008 03:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.