An example of a queriy in postition 6620 that could not complete. The error code thrown is 1146 and looks like this:
SHOW SLAVE STATUS \G Last_Error: Error 'Table 'data2.policydata' doesn't exist' on query. Default database: 'mytestdb'. Query: 'ALTER TABLE data2.policydata DROP PARTITION p6620'
Please note you can only fix 1 query at the time.
STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; START SLAVE; SHOW SLAVE STATUS\G;
This tells the slave to skip the first query that failed. If a a second error appears use the line below and so forth.
STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2; START SLAVE; SHOW SLAVE STATUS\G;
As you can se there is a pattern here SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 2 Means the second query that fails.
STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 3; START SLAVE; SHOW SLAVE STATUS\G;
And again a last time for the last query.
STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 4; START SLAVE; SHOW SLAVE STATUS\G;
STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 5; START SLAVE; SHOW SLAVE STATUS\G;