Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

use Amazon RDS as slave in mysql replication

I have one server where mysql is running, its a VM. I am currently configuring another mysql in in Amazon RDS. Can I use this RDS database as a slave of the VM database. So I want the VM DB to be the master of the replication and the RDS database be the slave.

Is it at all possible? Or any other option?

like image 872
A Paul Avatar asked Feb 19 '14 17:02

A Paul


People also ask

Is Amazon RDS compatible with MySQL?

With Amazon RDS, you can deploy scalable MySQL servers in minutes with cost-efficient and resizable hardware capacity. Amazon RDS for MySQL frees you up to focus on application development by managing time-consuming database administration tasks including backups, software patching, monitoring, scaling and replication.

Does RDS support replication?

Amazon RDS doesn't support circular replication. You can't configure a DB instance to serve as a replication source for an existing DB instance. You can only create a new read replica from an existing DB instance.


1 Answers

Yes it is possible, though this would not be a recommended setup.

RDS provides a built in procedure you can call to set this up. Rather than me explaining the procedure here, I will simply link you to the documentation.

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/mysql_rds_set_external_master.html

What this doesn't tell you is that you must have taken a consistent DB dump from the master DB and installed it on the RDS instance. You must also have obviously recorded the binary log position information when taking that consistent dump, so you have that information to use in the procedure.

like image 77
Mike Brant Avatar answered Sep 25 '22 13:09

Mike Brant