Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. 1. Master1
  2. 2. Master2
  3.  
  4. log-slave-updates
  5.  
  6. select @@global.log_slave_updates;
  7.  
  8. mysql> select @@global.log_slave_updates;
  9. +----------------------------+
  10. | @@global.log_slave_updates |
  11. +----------------------------+
  12. | 1 |
  13. +----------------------------+
  14. 1 row in set (0.00 sec)
  15.  
  16. log-bin = ....
  17.  
  18. mysql> show binary logs;
  19.  
  20. mysql> show binary logs;
  21. ERROR 1381 (HY000): You are not using binary logging
  22.  
  23. STOP SLAVE;
  24. FLUSH TABLES;
  25. FLUSH LOGS;
  26. SHOW BINARY LOGS;
  27.  
  28. CHANGE MASTER TO
  29. MASTER_HOST='IP or Hostname of Master2',
  30. MASTER_PORT=3306,
  31. MASTER_USER='...',
  32. MASTER_PASSWORD='...',
  33. MASTER_LOG_FILE='First Binary Log On Master2',
  34. MASTER_LOG_POS=4
  35. ;
  36. SHOW SLAVE STATUSG
  37.  
  38. START SLAVE IO_THREAD;
  39. DO SLEEP(10);
  40. SHOW SLAVE STATUSG
  41.  
  42. START SLAVE SQL_THREAD;
  43. DO SLEEP(10);
  44. SHOW SLAVE STATUSG
  45.  
  46. SHOW MASTER STATUS;
  47.  
  48. SHOW BINARY LOGS;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement