Managing MySQL replication filters in a live production environment doesn’t have to mean rebuilding your replicas from scratch. In this post, we’ll walk through how to safely exclude specific tables from replication and cleanly re-sync and add live tables back into the replication stream using mydumper and binlog coordinates, without ever touching the primary server.
Why use replication filters?
In MySQL, the primary-replica (formerly master-slave) architecture is the most widely used deployment pattern. Replication filters let you build replicas that hold only the data a team needs. Some teams need transaction data, others need analytics data, and a multi-source replica may combine data from several sources. Replicating less also reduces resource use.
Needs change over time, so you will often have to update a replica’s filters, either to stop replicating some tables or schemas, or to start replicating them again. …
[Read more]