mysql.rds_start_replication_until_gtid - Amazon Relational Database Service


Initiates replication from an RDS for MySQL DB instance and stops replication immediately after the specified global transaction identifier (GTID).


CALL mysql.rds_start_replication_until_gtid ( gtid );



The GTID after which replication is to stop.

Usage notes

The master user must run the mysql.rds_start_replication_until_gtid procedure.

This procedure is supported for all RDS for MySQL 5.7 versions, and RDS for MySQL 8.0.26 and higher 8.0 versions.

You can use this procedure with delayed replication for disaster recovery. If you have delayed replication configured, you can use this procedure to roll forward changes to a delayed read replica to the time just before a disaster. After this procedure stops replication, you can promote the read replica to be the new primary DB instance by using the instructions in Promoting a read replica to be a standalone DB instance.

You can configure delayed replication using the following stored procedures:

When the gtid parameter specifies a transaction that has already been run by the replica, replication is stopped immediately.


The following example initiates replication and replicates changes until it reaches GTID 3E11FA47-71CA-11E1-9E33-C80AA9429562:23.

call mysql.rds_start_replication_until_gtid('3E11FA47-71CA-11E1-9E33-C80AA9429562:23');