I'm running a master-master replication with read-only second master. Now since my binary logs are not getting replicated in my passive master.

  1. Should I need to enable --log-slave-updates? If I enable this, will I be able to take binary log backups from my passive master? If I enable it in passive master, I should not enable the same on active master right?

If I enable --log-slave-updates in my active master also, consider the case of a disaster where in my primary master has a issue, then I will make my passive master the active one and point my application to my new master. Now my new master will be generating binary logs which will be waiting to replicate to my actual master (which is down now). SO what happens when my actual master comes up? Binary of my secondary master gets copied to my primary without any issues?

  1. While enabling --log-slave-updates, should I have attn on any other parameters as well.?




  1. should be true on both masters. Because if both masters are accepting updates then the other passive master has to be able to update itself.

  2. You can take backups of the bin logs whenever you want.

  3. As to other options, I use the MIXED option for the binglog_format to allow for ROW based or STATEMENT based updates

    binlog_format = MIXED

This is because STATEMENT based replication doesn't cover all updates. But STATEMENT based replication is faster. With MIXED MySQL can switch for you when appropriate.

  • so you mean to say the binary logs will also be in sync if I set it to true in both masters? – tesla747 Sep 2 '15 at 12:58
  • Hi again @tesla747. I mean that if you update one master, the other master will commit the update as well. – Craig Efrein Sep 2 '15 at 13:10
  • so will the binary logs also remain identical in both masters, when both masters are in sync..its bit confusing. – tesla747 Sep 2 '15 at 13:29
  • 1
    @tesla747, the binary logs won't be identical but anything written to master 1 will be written to master 2 and vice-versa. – Craig Efrein Sep 2 '15 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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