Advertisement
rsevero

Untitled

Oct 26th, 2015
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. Create 3 empty MariaDB servers with the following configurations:
  2.  
  3. This procedure was tested with the MariaDB 10.1.8 Stable deb package available at http://mirror.edatel.net.co/mariadb/mariadb-10.1.8/repo/ubuntu
  4.  
  5. SETTING: Server_id: 1 | Domain_id: 1 | IP: 10.0.3.223
  6. STOP ALL SLAVES;
  7. CHANGE MASTER "M_2" TO
  8. master_host = "10.0.3.136",
  9. master_user = "replicator",
  10. master_use_gtid = slave_pos,
  11. master_password = "pass",
  12. do_domain_ids = (2);
  13. CHANGE MASTER "M_3" TO
  14. master_host = "10.0.3.171",
  15. master_user = "replicator",
  16. master_use_gtid = slave_pos,
  17. master_password = "pass",
  18. do_domain_ids = (3);
  19. START ALL SLAVES;
  20.  
  21.  
  22. SETTING: Server_id: 2 | Domain_id: 2 | IP: 10.0.3.136
  23. STOP ALL SLAVES;
  24. CHANGE MASTER "M_1" TO
  25. master_host = "10.0.3.223",
  26. master_user = "replicator",
  27. master_use_gtid = slave_pos,
  28. master_password = "pass",
  29. do_domain_ids = (1);
  30. CHANGE MASTER "M_3" TO
  31. master_host = "10.0.3.171",
  32. master_user = "replicator",
  33. master_use_gtid = slave_pos,
  34. master_password = "pass",
  35. do_domain_ids = (3);
  36. START ALL SLAVES;
  37.  
  38.  
  39. SETTING: Server_id: 3 | Domain_id: 3 | IP: 10.0.3.171
  40. STOP ALL SLAVES;
  41. CHANGE MASTER "M_1" TO
  42. master_host = "10.0.3.223",
  43. master_user = "replicator",
  44. master_use_gtid = slave_pos,
  45. master_password = "pass",
  46. do_domain_ids = (1);
  47. CHANGE MASTER "M_2" TO
  48. master_host = "10.0.3.136",
  49. master_user = "replicator",
  50. master_use_gtid = slave_pos,
  51. master_password = "pass",
  52. do_domain_ids = (2);
  53. START ALL SLAVES;
  54.  
  55.  
  56. Wait for all replications to be actually active them issue the following command on server 1:
  57.  
  58. OPTIMIZE TABLE mysql.user;
  59.  
  60. This command will be asigned a GTID 1-1-X
  61.  
  62. After that, look on binlogs of servers 2 and 3. On at least one of them you will find this same command with GTID 2-1-Y or 3-1-Y
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement