Changing MySQL Master in Replication: with or without MASTER_LOG? Let's say I have server A,B,C. Both B and C have Master A
A - Master
B - Slave
C - Slave

If I am going to change C's Master to Master B, can I change it immediately with query without Master Log information (edit: and also without dumping and importing the database)?

CHANGE MASTER TO MASTER_HOST='1.1.1.1', MASTER_USER='rep', MASTER_PASSWORD='password';


Or do I still need the Master Log Information ?

CHANGE MASTER TO MASTER_HOST='1.1.1.1', MASTER_USER='rep', MASTER_PASSWORD='password', MASTER_LOG_FILE='mysql-bin.000100', MASTER_LOG_POS=100;


If I need to Master Log information when switching Master, the MASTER_LOG_POS is running fast. How can I ensure that the number is not running?
If I enter the wrong MASTER LOG information, what will happen to my database?

Thank you for reading.
Assuming that no one can write (right now, before the change) in servers B and C you could try this:

First, lock writes on Server A, so there's nothing to replicate in the Slaves.

Server A (You'll lock all tables, NOTE: You should not exit this CLI, or it'll release the lock):

mysql&gt; FLUSH TABLES WITH READ LOCK;


Wait to Server B and Server C are up-to-date with the replication, check that both server are in the same Master Log File and Master Log Position!

Server B:

mysql&gt; SHOW MASTER STATUS;


From that one you can get your new MASTER_LOG_FILE and MASTER_LOG_POS.

Server C:

mysql&gt; STOP SLAVE;


So you can restart your slave from its new master. Then you can UNLOCK your tables in Server A (In the CLI that you had before):

mysql&gt; UNLOCK TABLES;


Now the only thing left is to do your CHANGE MASTER on Server C with the new MASTER_LOG_FILE and MASTER_LOG_POS that you got from Server B and everything should work fine.

IMPORTANT: You should check that Server B is running with log_slave_updates = TRUE and that you have log-bins too, since you'll need them for it to be a new Master.