Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you replicate a specific database or table using Amazon's RDS

Tags:

We are using Amazon RDS and we have a MASTER replicating to a SLAVE.

We want to create a new slave that will only replicate specific databases or tables from the master.

By default RDS simply just replicates the entire master's databases over to the slave's. But we only want to do specific tables. I know this is possible in MySQL in general, but I'm not sure about RDS and I can't find an answer anywhere.

These settings exists in MySQL, I do not see them on the custom parameter settings for RDS unless I'm missing something.

--replicate-ignore-db=db_name
--replicate-ignore-table=db_name.tbl_name
like image 693
Random5000 Avatar asked Aug 22 '13 02:08

Random5000


1 Answers

This isn't possible with RDS.

You can "fake it" by converting the tables you don't want replicated to Engine=Blackhole, however you have to edit your parameter-group and set "read-only" to 0, instead of the default "{TrueIfReplica}".

Alternately, you would need to run your own slave server on EC2 with the RDS server as the master (this is possible if you're running MySQL 5.6 on RDS, but not 5.5 or below), however it's extremely complicated to set up.

like image 130
Kat R. Avatar answered Oct 19 '22 10:10

Kat R.