Advertisement
Guest User

Untitled

a guest
Jun 16th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. mysqldump
  2. --all-databases
  3. --flush-logs
  4. --single-transaction
  5. --master-data
  6. | gzip > dump.sql.gz
  7.  
  8. CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.000012', MASTER_LOG_POS=120;
  9.  
  10. FLUSH PRIVILEGES;
  11. CHANGE MASTER TO
  12. master_host='master',
  13. master_user='username',
  14. master_password='secret';
  15. START SLAVE;
  16. SHOW SLAVE STATUSG
  17.  
  18. Master_Log_File: mysql-bin.000012
  19. Read_Master_Log_Pos: 800917736
  20. Relay_Log_File: relay-bin.000002
  21. Relay_Log_Pos: 635
  22. Relay_Master_Log_File: mysql-bin.000001
  23. Last_Error: Could not execute Write_rows event on table myschema.mytable; Duplicate entry '5191176' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.000001, end_log_pos 778
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement