你可以使用亚马逊的 RDS 复制特定的数据库或表吗 [英] Can you replicate a specific database or table using Amazon's RDS

查看:67
本文介绍了你可以使用亚马逊的 RDS 复制特定的数据库或表吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用 Amazon RDS,并且我们有一个 MASTER 复制到一个 SLAVE.

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.

默认情况下,RDS 只是将整个主数据库复制到从数据库.但是我们只想做特定的表.我知道这通常在 MySQL 中是可能的,但我不确定 RDS 并且我无法在任何地方找到答案.

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.

这些设置存在于 MySQL 中,除非我遗漏了什么,否则我在 RDS 的自定义参数设置中看不到它们.

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

推荐答案

这在 RDS 中是不可能的.

This isn't possible with RDS.

您可以通过将不想复制的表转换为 Engine=Blackhole 来伪造",但是您必须编辑参数组并将只读"设置为 0,而不是默认的{TrueIfReplica}".

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}".

或者,您需要在 EC2 上运行您自己的从服务器,并将 RDS 服务器作为主服务器(如果您在 RDS 上运行 MySQL 5.6,但不是 5.5 或更低版本,这是可能的),但是设置起来极其复杂

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.

这篇关于你可以使用亚马逊的 RDS 复制特定的数据库或表吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆