I've read about filtering replication and I only run into information I know already, like you can select only a database or a table to do replication on.

My use case is that I want to have a slim and fast master with main data organized into partitions - one partition per day (each day a new partition is created). The master only keeps most recent 10 days of data and I need the slaves to keep all.

How do I ALTER TABLE ... DROP PARTITION on master without being replicated on slaves?

I seems to me that somehow I have to instruct the master not to write this operation into bin-log, but how do I do it?

1 Answer 1


You could run SET SESSION sql_log_bin=0 in the session before running the ALTER TABLE...

  • seems my only option from what I could find out. Thank you!
    – Bogdan
    Sep 18, 2018 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.