We have a number of websites using mysql dbs. We are moving these sites to a new server. We also moving the dbs to a new server seperate server. To make this easier we have setup master slave replication.

The question is as we start moving the sites to the new server is there any problem with the using the slave db until we have moved all the sites across and can turn off the master?

1 Answer 1


No issues with using the slave DB if you are ok with having the site in read-only until the cutover.

You could turn the READ_ONLY=1 in my.cnf (set global read_only=1) in the slave just to make sure there are no unintentional writes to the slave.

  • what if we need to write to it?
    – matpol
    Sep 13, 2016 at 7:44
  • I can see the transfer of sites taking a bit of time so not being able to write could be an issue - would master to mater replication help?
    – matpol
    Sep 13, 2016 at 7:47
  • we using RDS so apparently this is not possible.
    – matpol
    Sep 13, 2016 at 7:56
  • probably should ask another question - could I add the dbs in question to 'replicate_ignore_db' on the master and restart? then writing to the slave would not be a problem?
    – matpol
    Sep 13, 2016 at 8:14
  • 1
    Writing to a Slave will make the Master and Slave have inconsistent data. That could be a disaster.
    – Rick James
    Sep 13, 2016 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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