Amazon Relational Database Service
User Guide (API Version 2014-10-31)

mysql.rds_start_replication_until

Initiates replication from an Amazon RDS MySQL DB instance and stops replication at the specified binary log file location.

Syntax

CALL mysql.rds_start_replication_until ( replication_log_file , replication_stop_point );

Parameters

replication_log_file

The name of the binary log on the replication master contains the replication information.

replication_stop_point

The location in the replication_log_file binary log at which replication will stop.

Usage Notes

The master user must run the mysql.rds_start_replication_until procedure.

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 master 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:

The file name specified for the replication_log_file parameter must match the master binlog file name.

When the replication_stop_point parameter specifies a stop location that is in the past, replication is stopped immediately.

The mysql.rds_start_replication_until procedure is available in these versions of Amazon RDS MySQL:

  • MySQL 5.6.40 and later 5.6 versions

  • MySQL 5.7.22 and later 5.7 versions

Examples

The following example initiates replication and replicates changes until it reaches location 120 in the mysql-bin-changelog.000777 binary log file.

call mysql.rds_start_replication_until( 'mysql-bin-changelog.000777', 120);