Master Slave GTID issues

If you find duplicate query in slave please follow the below steps to skip the query from slave.


Steps:
  1. Take the ID from show slave status\G
  2. Retrieved_Gtid_Set: 7d72f9b4-8577-11e2-a3d7-080027635ef5:1-5 (This is ID which you will find in show slave status which the slave was retrying)
  3. Executed_Gtid_Set: 7d72f9b4-8577-11e2-a3d7-080027635ef5:1-5 (This is ID which you will find in show slave status which slave need to execute afterwords)
  4. STOP SLAVE;
  5. SET GTID_NEXT=”7d72f9b4-8577-11e2-a3d7-080027635ef5:5″;  (This is ID which you need to take and edit from show slave status\G (here you need to take the ID fromExecuted_Gtid_Set and just increase with one number at end e.g.7d72f9b4-8577-11e2-a3d7-080027635ef5:1-5 Edit new ID7d72f9b4-8577-11e2-a3d7-080027635ef5:6 you need to remove 1-5 and add 6 at end))
  6. BEGIN; COMMIT;
  7. SET GTID_NEXT=”AUTOMATIC”;
  8. START SLAVE; [...]
Categories: linux, Mysql

Comments are closed.