简体   繁体   English

Mysql - 仅复制数据库中的几个表

[英]Mysql - Replicate only a few tables from a database

Using mysql replication with mysqlbinlogs between master and slave databases, is it possible to only replicate a few key tables instead of an entire database? 在主数据库和从数据库之间使用mysql复制和mysqlbinlogs,是否可以只复制几个关键表而不是整个数据库?

  1. I would ideally like to not even generate the mysqlbinlogs for the unneeded tables 理想情况下,我甚至不想为不需要的表生成mysqlbinlog

  2. If that was not possible, could I then use the slave with the limited tables and set up another master-slave that would result in the limited mysqlbinlogs? 如果那是不可能的,那么我可以使用有限表的slave并设置另一个主从,这会导致有限的mysqlbinlogs吗?

Binlog will be generated for all tables. 将为所有表生成Binlog。 Use the blackhole storage engine on another mysql instance to filter the binlog. 在另一个mysql实例上使用blackhole存储引擎来过滤binlog。 Here is a guide: http://jroller.com/dschneller/entry/mysql_replication_using_blackhole_engine 以下是指南: http//jroller.com/dschneller/entry/mysql_replication_using_blackhole_engine

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

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