Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. On existing node:
  2. # mysqldump --all-databases --triggers --routines --events -u root -p > /home/user/dump.sql
  3. Copy dump to new node
  4. Setup new node completely clean with group replication config (see config example below)
  5. mysql> SET SQL_LOG_BIN=0;
  6. mysql> CREATE USER 'repl'@'%' IDENTIFIED BY 'xxxxxxxx' REQUIRE SSL;
  7. mysql> GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%';
  8. mysql> FLUSH PRIVILEGES;
  9. mysql> CHANGE MASTER TO MASTER_USER='repl', MASTER_PASSWORD='xxxxxxxx' FOR CHANNEL 'group_replication_recovery';
  10. mysql> INSTALL PLUGIN group_replication SONAME 'group_replication.so';
  11. mysql> SET SQL_LOG_BIN=1;
  12. mysql> RESET MASTER;
  13. mysql> SOURCE /home/user/dump.sql;
  14. mysql> START GROUP_REPLICATION;
  15.  
  16. 2017-07-19T04:00:24.452539Z 7 [ERROR] Failed to open the relay log './hostname1-relay-bin-group_replication_applier.000001' (relay_log_pos 4).
  17. 2017-07-19T04:00:24.452549Z 7 [ERROR] Could not find target log file mentioned in relay log info in the index file './hostname1-relay-bin-group_replication_applier.index' during relay log initialization.
  18. 2017-07-19T04:00:24.454935Z 7 [ERROR] Plugin group_replication reported: 'Failed to setup the group replication applier thread.'
  19. 2017-07-19T04:00:24.454957Z 7 [Note] Plugin group_replication reported: 'The group replication applier thread was killed'
  20. 2017-07-19T04:00:24.454986Z 4 [ERROR] Plugin group_replication reported: 'Unable to initialize the Group Replication applier module.'
  21. 2017-07-19T04:00:24.455347Z 4 [Note] Plugin group_replication reported: 'Requesting to leave the group despite of not being a member'
  22. 2017-07-19T04:00:24.455361Z 4 [ERROR] Plugin group_replication reported: '[GCS] The member is leaving a group without being on one.'
  23. 2017-07-19T04:00:24.455372Z 0 [Note] Plugin group_replication reported: 'Destroying SSL'
  24. 2017-07-19T04:00:24.455380Z 0 [Note] Plugin group_replication reported: 'Success destroying SSL'
  25.  
  26. [mysqld]
  27. socket = /var/lib/mysql/mysql.sock
  28. pid-file = /var/run/mysqld/mysqld.pid
  29.  
  30. log-error = /var/log/mysqld/error.log
  31. symbolic-links = 0
  32. skip_name_resolve
  33.  
  34. ############# GROUP REPLICATION ###############
  35. # General replication settings
  36. gtid_mode = ON
  37. enforce_gtid_consistency = ON
  38. master_info_repository = TABLE
  39. relay_log_info_repository = TABLE
  40. binlog_checksum = NONE
  41. log_slave_updates = ON
  42. log_bin = mysql-bin
  43. relay_log = relay-bin
  44. binlog_format = ROW
  45. transaction_write_set_extraction = XXHASH64
  46. loose-group_replication_bootstrap_group = OFF
  47. loose-group_replication_start_on_boot = ON
  48. loose-group_replication_ssl_mode = REQUIRED
  49. loose-group_replication_recovery_use_ssl = 1
  50. loose-group_replication_single_primary_mode = OFF
  51. loose-group_replication_enforce_update_everywhere_checks = ON
  52. group_replication_auto_increment_increment = 3
  53. auto_increment_increment = 3
  54.  
  55. # Shared replication group configuration
  56. loose-group_replication_group_name = "84c75469-8959-4d4a-beb5-7753684a5161"
  57. loose-group_replication_ip_whitelist = "192.168.25.0/24,127.0.0.0/8"
  58. loose-group_replication_group_seeds = "192.168.25.2:13306,192.168.25.3:13306,192.168.25.4:13306"
  59.  
  60. # Host specific replication configuration
  61. server_id = 10
  62. bind-address = *
  63. report_host = "192.168.25.5"
  64. loose-group_replication_local_address = "192.168.25.5:13306"
  65. ########## END GROUP REPLICATION ##########
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement