This post discusses how to use replication filters to ignore a table or a database in replication. MySQL both have replication filters that explicitly allows and excludes replication of a database or a table from replicating. In this case, you will need to use the filters that ignore. There are three replications filters that can be used to ignore one or more tables:
Each of these options will be discussed below. Shared for all of them are that they take exactly one argument, but you can specify the same option multiple times as needed.
In statements-based replication, replicate-ignore-db ignores statements having the default database as the database being ignored. In row-based replication, all tables in the specified database are ignored.
This option ignores the one table specified.
This is the most flexible option. All tables matching the expression will be ignored. For example:
- replicate-wild-ignore-table = foo.% : ignores all tables in the foo database
- replicate-wild-ignore-table = foo.b% : ignores all tables in the foo database prefixed with b
- replicate-wild-ignore-table = foo%.bar% : does not replicate updates that use a table where the database name starts with foo and the table name starts with bar.