1

We are interested in migrating our data from one of our MYSQL slave databases to an Amazon RDS instance such that the new RDS database is a slave database to an external master DB from our colocation/facility.

I was reading through the documentation for RDS and was not keen on bringing our master mysql server down/stop writes while the import into RDS is taking place. I would prefer doing that import processing on an existing slave database.

We use some of the existing Percona tools to create slaves from existing slaves but I'm sure there are limitations on RDS so any helpful advise is appreciated.

Master MYSQL Version: 5.6.11-log MySQL Community Server (GPL) Slave MYSQL Version: 5.6.11-log MySQL Community Server (GPL)

2

This is completely possible. The only type of import you can use with RDS is a logical restore, so mysqldump. You will want to use the --dump-slave=2 option :

mysqldump --dump-slave=2 (other options) > dump.sql

This will add the CHANGE MASTER statement as a SQL comment to the dump.sql file. Take the binary log file and log position from that statement and set the RDS up accordingly:

CALL mysql.rds_set_external_master (
  host_name
  , host_port
  , replication_user_name
  , replication_user_password
  , <binary log file>
  , <binary log position>
);

[src]

I would caution you that your replication events are going to be sent as plain text, since ssl_encryption is not implemented for RDS MySQL. If your existing master is not in AWS, to be secure you would need to have your RDS instance in a VPC and set up to communicate with a VPN in your existing infrastructure. Read more about this in the docs: https://aws.amazon.com/vpc/

  • Thank you am looking into this option now... will let you know how it goes! – Ranknoodle Sep 17 '15 at 21:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.