当前位置:Gxlcms > 数据库问题 > Repair MySQL 5.6 GTID replication by injecting empty transactions

Repair MySQL 5.6 GTID replication by injecting empty transactions

时间:2021-07-01 10:21:17 帮助过:2人阅读

 

STOP SLAVE; SET GTID_NEXT="7d72f9b4-8577-11e2-a3d7-080027635ef5:5"; BEGIN; COMMIT; SET GTID_NEXT="AUTOMATIC"; START SLAVE; [...] Retrieved_Gtid_Set: 7d72f9b4-8577-11e2-a3d7-080027635ef5:1-5 Executed_Gtid_Set: 7d72f9b4-8577-11e2-a3d7-080027635ef5:1-5    

After the START SLAVE the slave checks that transaction 5 is already in its own binary log and that means that it has been executed.

This is an easy way to skip some transactions but take in account that by doing this you will end up with data inconsistencies between Master and Slave servers. pt-table-checksum can help you here, which is found in Percona Toolkit for MySQL.

Last week I gave a talk at Percona MySQL University @Toronto about GTID. It includes an overview of MySQL 5.6 GTID that can help people to start working with this new feature in MySQL 5.6. Here are the slides from that session. I hope you find it useful: MySQL 5.6 GTID in a nutshell

Repair MySQL 5.6 GTID replication by injecting empty transactions

标签:

人气教程排行