1,针对传统复制:start slave 可以指定sql线程的 end log file and position的: START SLAVE UNTIL sql_thread master_log_file=‘binlog.000002‘,master_log_pos=829090187; START SLAVE [SQL_THREAD] UNTIL MASTER_LOG_FILE = ‘log_name‘, MASTER_LOG_POS = log_pos START SLAVE [SQL_THREAD] UNTIL RELAY_LOG_FILE = ‘log_name‘, RELAY_LOG_POS = log_pos thread_type: IO_THREAD | SQL_THREAD 2,针对gtid复制:start slave 可以指定sql线程的sql_before_gtids的:
start slave sql_thread until sql_before_gtids=‘9e912d2b-92f6-11e8-9747-0050568be82c:9791090‘;
不过UNTIL语法不可以用在IO_THREAD上。
https://www.cnblogs.com/fengjian2016/p/12456170.html
原文:https://www.cnblogs.com/igoodful/p/13051178.html