具体操作是,在日志中找到错误代码然后指定跳过的错误代码即可。
我的错误代码是1396.
2016-01-01 15:25:55 28177 [Note] Slave SQL thread initialized, starting replication in log '210-log-bin.000003' at position 537, relay
log '/data/mysql/relay-log/slave-relay-bin.000002' position: 414
2016-01-01 15:25:55 28177 [ERROR] Slave SQL: Worker 1 failed executing transaction '' at master log 210-log-bin.000003, end_log_pos 69
4; Error 'Operation DROP USER failed for ''@'shangjia1.test.com'' on query. Default database: 'mysql'. Query: 'drop user ""@'shangjia1
.test.com'', Error_code: 1396
2016-01-01 15:25:55 28177 [Warning] Slave SQL: ... The slave coordinator and worker threads are stopped, possibly leaving data in inco
nsistent state. A restart should restore consistency automatically, although using non-transactional storage for data or info tables o
r DDL queries could lead to problems. In such cases you have to examine your data (see documentation for details). Error_code: 1756
2016-01-01 15:35:41 28177 [ERROR] Error reading packet from server: Lost connection to MySQL server during query ( server_errno=2013)
2016-01-01 15:35:41 28177 [Note] Slave I/O thread killed while reading event
2016-01-01 15:35:41 28177 [Note] Slave I/O thread exiting, read up to log '210-log-bin.000003', position 2796
2016-01-01 15:37:10 28177 [Warning] Storing MySQL user name or password information in the master info repository is not secure and is
therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Synta
x' in the MySQL Manual for more information.
2016-01-01 15:37:10 28177 [Note] Slave I/O thread: connected to master 'copy@10.101.200.210:3306',replication started in log '210-log-
bin.000003' at position 2796
2016-01-01 15:37:10 28177 [Note] Slave SQL thread initialized, starting replication in log '210-log-bin.000003' at position 537, relay
log '/data/mysql/relay-log/slave-relay-bin.000002' position: 414
2016-01-01 15:37:10 28177 [ERROR] Slave SQL: Worker 1 failed executing transaction '' at master log 210-log-bin.000003, end_log_pos 69
4; Error 'Operation DROP USER failed for ''@'shangjia1.test.com'' on query. Default database: 'mysql'. Query: 'drop user ""@'shangjia1
.test.com'', Error_code: 1396
2016-01-01 15:37:10 28177 [Warning] Slave SQL: ... The slave coordinator and worker threads are stopped, possibly leaving data in inco
nsistent state. A restart should restore consistency automatically, although using non-transactional storage for data or info tables o
r DDL queries could lead to problems. In such cases you have to examine your data (see documentation for details). Error_code: 1756