mysqlreplicationmaster-slave

Is it ok to stop a slave mysql server for a few hours?


What will happen if you stop a mysql slave server for a few hours(8 hours)? Can the master log all the changes it made for the last 8 hours and can you just start the slave server again and just wait for it to catch up with the master?


Solution

  • As long as you have space for the log files, you can stop it as long as you want. In extreme cases, if your data change volume is high enough, your slave won't be able to keep up. But if that's happening you need to be using different hardware or load balancing the database differently.