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

Random5000 picture Random5000 · Aug 22, 2013 · Viewed 9.8k times · Source

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

Answer

Kat R. picture Kat R. · Sep 18, 2013

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.