Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am still pretty newbie to mysql. This question is regarding promoting slave with option --log-slave-updates to become a master.

The typical schema of promoting slave to master was described in 15.3.6 Switching Masters During Failover. Here you can find very strict steps how to do it :

Run your slaves with the --log-bin option and without --log-slave-updates. The reason for running the slave without --log-slave-updates is to prevent slaves from receiving updates twice in case you cause one of the slaves to become the new master.

Let's say I have the schema like the following (the image was taken from 15.3.5. Improving Replication Performance).

enter image description here

Where Master 2 is actually a slave with --log-slave-updates and bin-log enabled. I need to enable --log-slave-update in order to save bin-log from the Master 1 to bin-log of Master 2 and then transfer it to all slave. In case of failover I need promote Master 2 to the role of Master 1. But there is a contradiction to the standard MySql failover schema I have --log-slave-updates enabled which can cause a problem.

In your opinion. What the action I should take in order to do this?

share|improve this question
up vote 2 down vote accepted

The warning about --log-slave-updates will only apply if you had multiple intermediary 'Master/Slave' servers.

The warning is this (my emphasis):

Then it will write updates that it receives from Master to its own binary log. When Slave 2 changes from Master to Slave 1 as its master, it may receive updates from Slave 1 that it has already received from Master

But in your scenario, Slave 2 is not changing masters, it will still point to the same Master 2 server it always was at.

So now, in case of Master 1 failing, you will need to do two things:

  • Make sure your applications point to Master 2
  • Follow the instructions on promoting one of the three slaves to be new Master 2
  • make sure to enable --log-slave-updates on the new Master 2
share|improve this answer
Thank you very much for the answer. I found in the manual that "STOP SLAVE and RESET MASTER" should be started on new master (Master 2), but in the manual of ([RESET MASTER Syntax] is written that "This statement is intended to be used only when the master is started for the first time." but it's not exactly the truth, the master was master, I just need to STOP SLAVE and somehow reset slave setting of the new master. How can I do this? – com Sep 4 '12 at 12:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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