Skip to content

Instantly share code, notes, and snippets.

@nikolai-wolterstorff
Created February 4, 2021 20:47
Show Gist options
  • Select an option

  • Save nikolai-wolterstorff/157f336f240ac7ebce2f19a52760c1a5 to your computer and use it in GitHub Desktop.

Select an option

Save nikolai-wolterstorff/157f336f240ac7ebce2f19a52760c1a5 to your computer and use it in GitHub Desktop.
MySQL 8 Skip Slave Transaction (GTID)
-- https://www.abhinavbit.com/2019/05/gtid-replication-skip-transaction-using.html
-- In command line interface (bin/mysql):
show slave status \G;
-- In Workbench:
show slave status;
-- Find the Master_UUID column and note the value
-- example: 11387751-34f3-11e4-a177-005056881ef0
-- Find the Executed_Gtid_Set column and find the Master_UUID set
-- example: Executed_Gtid_Set: 11387751-34f3-11e4-a177-005056881ef0:1233-86906
STOP SLAVE;
SET GTID_NEXT="11387751-34f3-11e4-a177-005056881ef0:86907"; -- increment the Executed_Gtid_Set from above by 1
BEGIN; COMMIT;
SET GTID_NEXT="AUTOMATIC";
START SLAVE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment