简体   繁体   English

如何从RDS Mysql复制中排除一些表

[英]How to exclude some tables from RDS Mysql replication

i have a cluster structure on RDS (master/slave)...and all the temporary tables created on the master are replicated on the slave. 我在RDS(主/从)上有一个集群结构......并且在主服务器上创建的所有临时表都在从服务器上复制。 I don't want that.... 我不想那....

I want that statements like: 我想要这样的陈述:

create temporary table tmp as (select * from tb); 创建临时表tmp as(select * from tb);

...do not gets replicated. ......不要复制。

I would want that NO temporary table were replicated. 我希望没有复制临时表。 I realize now that i must user the option "replicate-ignore-table=name" ... 我现在意识到我必须使用“replicate-ignore-table = name”选项...

But any one knows how t do that on RDS? 但任何人都知道如何在RDS上做到这一点? I think i have to user the client tool right? 我想我必须使用客户端工具吗?

Someone has an example? 有人举个例子吗?

Indeed, RDS contains a section call Parameter Groups . 实际上,RDS包含一个段调用Parameter Groups

(UPDATE) (UPDATE)

For RDS Mysql, there is no such options. 对于RDS Mysql,没有这样的选项。 Although SHOW SLAVE STATUS\\G or SHOW MASTER STATUS\\G will show those parameter. 虽然SHOW SLAVE STATUS\\GSHOW MASTER STATUS\\G会显示那些参数。

For Mariadb 10, you can select those allowed custom RDS parameter eg replicate_ignore_db and create a parameter group, then attach to RDS instance DB Parameter Group . 对于Mariadb 10,您可以选择那些允许的自定义RDS参数,例如replicate_ignore_db并创建参数组,然后附加到RDS背景DB Parameter Group

You can also switch your binlog format to ROW instead of STATEMENT/MIXED. 您也可以将binlog格式切换为ROW而不是STATEMENT / MIXED。

This because temporary tables in ROW binlog format are not replicated. 这是因为不复制ROW binlog格式的临时表。

Source: https://dev.mysql.com/doc/refman/5.6/en/replication-features-temptables.html 资料来源: https//dev.mysql.com/doc/refman/5.6/en/replication-features-temptables.html

Edit: In RDS MariaDB only, you can use the following options: 编辑:仅在RDS MariaDB中,您可以使用以下选项:

  • replicate_ignore_db replicate_ignore_db
  • replicate_ignore_table replicate_ignore_table
  • replicate_wild_ignore_table replicate_wild_ignore_table

Source: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MariaDB.Parameters.html 资料来源: https//docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MariaDB.Parameters.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM