SET GLOBAL sql_slave_skip_counter = N
This statement skips the next
N events from the master. This is useful
for recovering from replication stops caused by a statement.
If multi-source replication is used, this statement applies to the default connection. It could be necessary to change the value of the
default_master_connection server system variable.
Note that, if the event is a transaction, the whole transaction will be skipped. With non-transactional engines, an event is always a single statement.
This statement is valid only when the slave threads are not running. Otherwise, it produces an error.
The statement does not automatically restart the slave threads.
SHOW SLAVE STATUS \G ... SET GLOBAL sql_slave_skip_counter = 1; START SLAVE;
SET @@default_master_connection = 'master_01'; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; START SLAVE;