MENU
Administration
To check the replication status on the slave, run SHOW SLAVE STATUS. To check the status of connected slaves on the master, run SHOW PROCESSLIST. If the slaves were started with the--report-host option, you can obtain basic information about the slave on the master with SHOW SLAVE HOSTS.To pause or resume replication on a slave, consider:
[STOP|START] SLAVE [IO_THREAD|SQL_THREAD] |
The IO_THREAD reads events from the master while the SQL_THREAD executes the received events. You can stop one while allowing the other to run.
To replicate different databases on different slaves, use, on each slave, in the command line, the configuration option --replicate-wild-do-table:
--replicate-wild-do-table=databaseX.% |
To delay replication such that the slave lags behind the master by at least N seconds:
CHANGE MASTER TO MASTER_DELAY = N; |
You can get more control over the replication and binary logging by manipulating the system variables or command-line options. You can also perform semisynchronous replication. These and some other issues are not covered in this book, but you can always refer to the official online documentation to get an in-depth knowledge of replication.