· 8 years ago · Jul 12, 2018, 08:20 AM
1START GROUP_REPLICATION;
2
3ERROR 3096 (HY000): The START GROUP_REPLICATION command failed as there was an error when initializing the group communication layer.
4
5# General replication settings
6gtid_mode = ON
7enforce_gtid_consistency = ON
8master_info_repository = TABLE
9relay_log_info_repository = TABLE
10binlog_checksum = NONE
11log_slave_updates = ON
12log_bin = binlog
13binlog_format = ROW
14transaction_write_set_extraction = XXHASH64
15loose-group_replication_bootstrap_group = OFF
16loose-group_replication_start_on_boot = OFF
17loose-group_replication_ssl_mode = REQUIRED
18loose-group_replication_recovery_use_ssl = 1
19
20# Shared replication group configuration
21loose-group_replication_group_name = "$serveruuid"
22loose-group_replication_ip_whitelist = "$PrivateIpsOfServers"
23loose-group_replication_group_seeds = "$PrivateIpsOfServersWithPort"
24
25# Single or Multi-primary mode? Uncomment these two lines
26# for multi-primary mode, where any host can accept writes
27loose-group_replication_single_primary_mode = OFF
28loose-group_replication_enforce_update_everywhere_checks = ON
29
30# Host specific replication configuration
31server_id = $serverid
32bind-address = "0.0.0.0"
33report_host = "$privateip"
34loose-group_replication_local_address = "$privateip:33061"
35
36SET SQL_LOG_BIN=0;
37CREATE USER 'repl'@'%' IDENTIFIED BY '$mysqlrepl' REQUIRE SSL;
38GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%';
39FLUSH PRIVILEGES;
40SET SQL_LOG_BIN=1;
41CHANGE MASTER TO MASTER_USER='repl', MASTER_PASSWORD='$mysqlchannel' FOR CHANNEL 'group_replication_recovery';
42INSTALL PLUGIN group_replication SONAME 'group_replication.so';
43CREATE DATABASE IF NOT EXISTS PricingV2;
44CREATE USER 'pricing-worker'@'%' IDENTIFIED BY '$mysqlworker';
45GRANT ALL PRIVILEGES ON PricingV2.* TO 'pricing-worker'@'%';
46FLUSH PRIVILEGES;
47SET GLOBAL group_replication_bootstrap_group=ON;