4

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?

  1. I would ideally like to not even generate the mysqlbinlogs for the unneeded tables

  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?

LTME
  • 1,086
  • 1
  • 10
  • 13

1 Answers1

1

Binlog will be generated for all tables. Use the blackhole storage engine on another mysql instance to filter the binlog. Here is a guide: http://jroller.com/dschneller/entry/mysql_replication_using_blackhole_engine

Erik Ekman
  • 2,051
  • 12
  • 13
  • Thanks for your reply, But I'm not quite clear on how the blackhole storage engine would help me filter the binlog, could you elaborate please? – LTME Mar 07 '12 at 22:40
  • You set up a slave server that does a binary log. Use `replicate-ignore-db` and similar settings to filter which tables to replicate. Use `BLACKHOLE` storage for all tables. This server will write a new smaller binlog with those tables which you can use as master for other slaves. – Erik Ekman Mar 12 '12 at 21:09