Guest User

Untitled

a guest
Mar 26th, 2018
275
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. auto-increment-increment = 2
  2. auto-increment-offset = 1
  3.  
  4. auto-increment-increment = 2
  5. auto-increment-offset = 2
  6.  
  7. Server 1:
  8. mysql>
  9. RESET MASTER;
  10. # First time only:
  11. #GRANT REPLICATE SLAVE ON *.* TO 'replicate'@192.168.2.7 IDENTIFIED BY '[password_redacted]';
  12. #FLUSH PRIVILEGES;
  13. FLUSH TABLES WITH READ LOCK;
  14. SHOW MASTER STATUS;
  15.  
  16. bash#
  17. mysqldump -u root -p -ceQRE --hex-blob --triggers --opt --single-transaction --comments --dump-date --no-autocommit --all-databases -r /root/master.sql
  18. scp -P 5934 /root/master.sql root@192.168.2.7:.
  19.  
  20. mysql>
  21. UNLOCK TABLES;
  22.  
  23. Server 2:
  24. mysql>
  25. STOP SLAVE;
  26.  
  27. bash#
  28. mysql -u root -p < /root/master.sql
  29.  
  30. mysql>
  31. # First time only:
  32. #GRANT REPLICATE SLAVE ON *.* TO 'replicate'@192.168.2.6 IDENTIFIED BY '[password_redacted]';
  33. #FLUSH PRIVILEGES;
  34. RESET SLAVE;
  35. CHANGE MASTER TO MASTER_HOST='192.168.2.6', MASTER_USER='replicate', MASTER_PASSWORD='[password_redacted]', MASTER_LOG_FILE='ibm.000001', MASTER_LOG_POS=28556380;
  36. START SLAVE;
  37. SHOW SLAVE STATUSG
  38.  
  39. Server 1:
  40. mysql>
  41. STOP SLAVE;
  42. CHANGE MASTER TO MASTER_HOST='192.168.2.7', MASTER_USER='replicate', MASTER_PASSWORD='[password_redacted]', MASTER_LOG_FILE='ibm.000004', MASTER_LOG_POS=121875;
  43. CHANGE REPLICATION FILTER REPLICATE_DO_DB = (reminderdental2), REPLICATE_IGNORE_DB = (mysql);
  44. START SLAVE;
  45.  
  46. Slave SQL for channel '': Slave failed to initialize relay log info structure from the repository, Error_code: 1872
  47. ERROR 1872 (HY000): Slave failed to initialize relay log info structure from the repository
Add Comment
Please, Sign In to add comment