Advertisement
fduran

mysql commands to restart a slave

Dec 4th, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. # mysql commands to restart a slave
  2. On master:
  3.  
  4. FLUSH TABLES WITH READ LOCK;
  5. SHOW MASTER STATUS;
  6.  
  7. +------------------+----------+--------------+------------------+
  8. | File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
  9. +------------------+----------+--------------+------------------+
  10. | mysql-bin.000003 | 1380 | dbname | mysql |
  11. +------------------+----------+--------------+------------------+
  12.  
  13. On slave:
  14.  
  15. STOP SLAVE;
  16. CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000003', MASTER_LOG_POS=1380;
  17. START SLAVE;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement