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. Join them; it only takes a minute:

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 working as a remote DBA for some of the production servers.

There was replication from Master to Slave.

There is something changed in the scenario they have made one of the Slaves as master now..

when i saw the error log of the machine which is master now I got an error.I was unable to understand what is this..

Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it.

but all are working well now.Please help to understand what was that.


share|improve this question
Did you check the value of server-id in your mysql config? – Khaled Dec 7 '11 at 10:10
@Khaled:I am not very clear what is being done.I think in migrating the one of the slave's as master they have made the id's of that slave and previous master equal.what you think..? – Abdul Manaf Dec 7 '11 at 10:27
Maybe, you need to change this parameter and try again. – Khaled Dec 7 '11 at 10:34
@Khaled:All things are working fine after that.just i was asking what was the issue so that error comes in the error log of that slave which is now master. – Abdul Manaf Dec 7 '11 at 10:43
I have not done all the process which i have stated above thats why i was asking. – Abdul Manaf Dec 7 '11 at 10:45
up vote 2 down vote accepted

Here is something interesting about MySQL Replication:

When it comes to Master/Slave Replication

  • Master DB Server must have server-id defined in my.cnf
  • Master DB must have binary logging enabled (define log-bin)
  • Slave DB Server is not required to defined server-id in my.cnf

If, all of a sudden, you find yourself having to reverse the DB Server's roles (making the old Slave the new Master, and making the old Master the Slave), the requirement to define server-id and log-bin must also hold true.

BTW a DB Server without server-id being set has a default value of 1. If server-id was define as 1 on the Master and the Slave did not have server-id defined, the Slave would also have had server-id being equal to 1. Activating the Slave as the new Master with any trace remnants of the old replication setup wmay have attempted to complete the processing of any remaining SQL entries in the relay logs. Those entries carried the server-id of 1. Bringing those entries over to a new machine without server-id define would have caused mysqld to complain about processing relay logs entries with the same server-id.

Perhaps, someone forgot to define the server-id on the Slave before making it the new Master and trying to engage Replication afterwards. Adding server-id to my.cnf and a quick restart of mysqld would have eliminated this weird situation without giving it a second thought.

share|improve this answer

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.