MySQL Utilities Makes Skipping Transactions on Multiple Servers Easy

We are very happy to introduce a new MySQL utility named “mysqlslavetrx“, which allows users to easily skip multiple transactions on multiple servers in a single step. This utility is one of three new utilities included in MySQL Utilities release-1.6.1 Alpha. The other utilities are “mysqlbinlogpurge” and “mysqlbinlogrotate“, which can be used to purge and rotate binary logs.

The mysqlslavetrx utility allows you to skip multiple transactions on several slaves. More precisely, it injects empty transactions for the specified Global Transaction Identifier (GTID) set and list of target slaves. Skipping transactions can be useful to quickly recover from erroneous situations that can occur during the replication process, or to handle errant transactions. Check out the following blog posts for more details about concrete situations where you might need to inject empty transactions:

The mysqlslavetrx utility can assist you in the above situations, making the process of injecting empty transactions less tedious. However, misuse of this technique may cause the slaves to skip the wrong transactions. Thus, take care to ensure the transactions skipped do not introduce data inconsistencies.

Note: You can use the mysqlrplsync utility to check the data consistency of a replication topology.

About Paulo Jesus

Paulo Jesus is currently a Principal Software Developer at Oracle, and team lead of the MySQL Fabric (Core) team. He received the BEng degree in systems and informatics in 2001, and the MSc degree in mobile systems in 2007, both from the University of Minho (Portugal). He obtained his PhD degree in 2012, from the MAP-i doctoral program in computer science by the Universities of Minho, Aveiro and Porto (Portugal). He has many years of professional experience as a software developer in relevant companies, and taught informatics during 1 year. He is also an invited researcher at the HASLab / INESC TEC, University of Minho. His research interests include distributed algorithms, fault tolerance, and mobile systems.
View all posts by Paulo Jesus →