原 MySQL跳过GTID事务的方法
设置参数slave_skip_errors
使用GTID复制从库跳过错误,不支持设置sql_slave_skip_counter,但是支持设置参数slave_skip_errors,只能在参数文件中设置。
1 2 3 | MySQL [(none)]> set global sql_slave_skip_counter=1; ERROR 1858 (HY000): sql_slave_skip_counter can not be set when the server is running with @@GLOBAL.GTID_MODE = ON. Instead, for each transaction that you want to skip, generate an empty transaction with the same GTID as the transaction MySQL [(none)]> |