0

I've successfully copied data over the period of four hours from an external percona mysql database to an AWS Aurora cluster. Is it possible to configure the AWS Aurora database as a slave to avoid having to setup a fresh slave instance?

Lloyd Moore
  • 3,117
  • 1
  • 32
  • 32

1 Answers1

0

Yes you can do that, and details about how to are available here: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Replication.MySQL.html

From that page:

  1. Retrieve the binlog file and binlog position that are the starting place for replication. You retrieved these values from the SHOW SLAVE STATUS command when you created the snapshot of your replication master. If your database was populated from the output of the mysqldump command with the --master-data=2 option, then the binlog file and binlog position are included in the output.

  2. Connect to the Aurora endpoint and issue CALL mysql.rds_set_external_master using the binary log information:

    CALL mysql.rds_set_external_master ( host_name , host_port , replication_user_name , replication_user_password , mysql_binary_log_file_name , mysql_binary_log_file_location , ssl_encryption );

    The you should issue CALL mysql.rds_start_replication;

You will need a replication user on the external MySQL instance and also you should take the necessary precautions to secure the instance via security groups.

cEz
  • 4,932
  • 1
  • 25
  • 38
greenweeds
  • 524
  • 2
  • 13