With support of multi-threads replication starting from MySQL 5.7, the operations on slave are slightly different from single-thread replication. Here is a list of some operation tips for the convenience of use as below:
1. Skip a statement for a specific channel.
Sometimes, we might find out that one of the channels stop replication due to some error, and we may want to skip the statement for that channel so that we can restart a slave for it. We need to be very careful not to skip the statement from the other channel, since the command SET GLOBAL sql_slave_skip_counter = N is for global. How can we make sure the global sql_slave_skip_counter is applied to a specific channel and not to the other channel? Here are the steps:
1.1: Stop all slaves by: stop slave;
1.2: Set up the count of statement to skip by: SET GLOBAL sql_slave_skip_counter = N;
SET GLOBAL …[Read more]