1

I have 4 servers running MySQL 5.6. A,B,C and D. A and B are Master and slave whose default port is 3306. C and D are running in non-default ports 3360.

A and C are in Master-Master replication mode. C and D are in Master-Slave setup.

Now I need to change the ports on A and B from 3306 to 3360, what commands I need to run and in what order to have B,C and D back in replication?

Is the below steps right?

  1. Stop the slaves in B, C and D.
  2. Stop A and change the port in A to 3360 and start A.
  3. Stop B and change the port in B to 3360. Ensure skip slave start is set to true.
  4. Start B and run change master to master_port=3360 and start slave.
  5. In C, run the same as step 4.
  6. Start slave in D.

And also, while I type change master to master_port, should I write the full commands with master_log_pos, username, pass and then port? Or just the port is enough to restart the replciation?

  • Can you check your 2nd paragraph, A and C are master-master, and C and D are master-slave? where is B in all of this? In any case, I believe your steps are correct. – jerichorivera Nov 6 '16 at 11:33

Your Answer

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

Browse other questions tagged or ask your own question.