To Nha Notes | Feb. 21, 2024, 6:29 p.m.
When working with Amazon RDS for MySQL, you can use the following stored procedures to control replication between an external database and RDS for MySQL, or vice versa:
mysql.rds_next_master_log: This procedure changes the source database instance’s log position to the start of the next binary log on the source database instance. Use it if you encounter replication I/O error 1236 on a read replica. The master user should run this procedure. Be cautious, as calling it can result in data loss in the read replica if transactions in the source instance were not written to the binary log on disk before a failover event occurred1.
mysql.rds_reset_external_master: Resets the external master configuration for replication. Use it when you need to reconfigure replication from an external database to RDS for MySQL.
mysql.rds_set_external_master: Sets the external master configuration for replication. Use it to configure replication from an external database to RDS for MySQL.
mysql.rds_set_external_master_with_auto_position: Configures replication from an external database to RDS for MySQL using auto-positioning.
mysql.rds_set_external_master_with_delay: Sets up replication from an external database to RDS for MySQL with a specified delay.
mysql.rds_set_master_auto_position: Configures RDS for MySQL as a replication source using auto-positioning.
mysql.rds_set_source_delay: Sets a replication delay for RDS for MySQL.
mysql.rds_skip_transaction_with_gtid: Skips a transaction with a specific global transaction identifier (GTID) during replication.
mysql.rds_skip_repl_error: Skips a replication error during replication.
mysql.rds_start_replication: Starts replication from an external database to RDS for MySQL.
mysql.rds_start_replication_until: Starts replication until a specific log file position.
mysql.rds_start_replication_until_gtid: Starts replication until a specific GTID position.