Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

Script to skip transaction in GTID based replication in MySQL?

$
0
0

In classical MySQL replication we can easily skip a transaction by command:

Set sql_slave_skip_counter = 1 ; 

start slave;

I have created a script and run it in a cronjob so that whenever slave stopped, it triggers a email of the error and start slave after skipping the transaction by above two commands.

But on error in a GTID based replication - first we have to check the last executed_gtid and then add 1 in last executed GTID and then set the GTID_EXECUTED parameter and then start the slave.

So is there any script or automation process of capturing the last_gtid add 1 and skip the transaction etc ?

If anyone has created script then please let me know.

Thanks


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>