Tuesday, 12 January 2016

Solved MySQL replication after slaves's relay log was corrupted


mysql>show slave status\G;

Note
Relay_Master_Log_File: mysql-bin.002045
Exec_Master_Log_Pos: 1038350378

# stop slave
mysql> stop slave;

# make slave forget its replication position in the master's binary log
mysql> reset slave;

# change slave to start reading from stopped position
mysql> change master to master_log_file='mysql-bin.002045', master_log_pos=1038350378;

# start slave
mysql> start slave;

No comments:

Post a Comment