mysql5.6主从复制第五部分[如何在从服务器中跳过一条语句/事务]
写这篇笔记的时候,mysql已经从5.6.10发展到了5.6.12
SQL_SLAVE_SKIP_COUNTER 对于GTID没用 。
准备测试环境,按照 http://www.zhaokunyao.com/archives/4131 配置主从。
master port 5612
slave port 5613
然后把slave设置成落后于master 600秒, 便于测试:
mysql [localhost] {msandbox} (test) > CHANGE master TO MASTER_DELAY=600; ERROR 1198 (HY000): This operation cannot be performed WITH a running slave; run STOP SLAVE FIRST mysql [localhost] {msandbox} (test) > mysql [localhost] {msandbox} (test) > stop slave; Query OK, 0 ROWS affected (0.05 sec) mysql [localhost] {msandbox} (test) > CHANGE master TO MASTER_DELAY=600; Query OK, 0 ROWS affected (0.27 sec) mysql [localhost] {msandbox} (test) > START slave; Query OK, 0 ROWS affected, 1 warning … |