» 2017 » May » 02 の記事

mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)

mysql> set global sql_slave_skip_counter=2;
Query OK, 0 rows affected (0.00 sec)

START SLAVE;

SHOW SLAVE STATUS \G;

 

如果Slave DB出現以下情況。

Relay log read failure: Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's MySQL code. If you want to check the master's binary log or slave's relay log, you will be able to know their names by issuing 'SHOW SLAVE STATUS' on this slave.

先記住Master_Log_File,Exec_Master_Log_Pos

stop slave;

CHANGE MASTER TO MASTER_HOST='{SERVERIP}', MASTER_PORT={PORT}, MASTER_USER='{USER}', MASTER_PASSWORD='{PASSWORD}' ,  master_log_file='mysql-bin.000002' , master_log_pos=326554769 ;
Query OK, 0 rows affected (0.07 sec)

START SLAVE;

SHOW SLAVE STATUS \G;

 

| HOME |

Smiley face

May 2017
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
28293031