1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
include/group_replication.inc
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
[connection server1]
############################################################
# 1. Persist configuration on server1.
[connection server1]
SET PERSIST group_replication_group_name= "GROUP_REPLICATION_GROUP_NAME";
SET PERSIST group_replication_group_seeds= @@GLOBAL.group_replication_group_seeds;
SET PERSIST group_replication_local_address= @@GLOBAL.group_replication_local_address;
SET PERSIST group_replication_start_on_boot= ON;
SET PERSIST group_replication_bootstrap_group= ON;
SET PERSIST group_replication_recovery_get_public_key= ON;
############################################################
# 2. Restart server1, it must bootstrap the group.
# restart
include/rpl_reconnect.inc
include/gr_wait_for_member_state.inc
SELECT variable_name, variable_source FROM performance_schema.variables_info WHERE variable_source IN ('PERSISTED');
variable_name variable_source
group_replication_bootstrap_group PERSISTED
group_replication_group_name PERSISTED
group_replication_group_seeds PERSISTED
group_replication_ip_allowlist PERSISTED
group_replication_local_address PERSISTED
group_replication_recovery_get_public_key PERSISTED
group_replication_start_on_boot PERSISTED
############################################################
# 3. Persist configuration on server2.
[connection server2]
SET PERSIST group_replication_group_name= "GROUP_REPLICATION_GROUP_NAME";
SET PERSIST group_replication_group_seeds= @@GLOBAL.group_replication_group_seeds;
SET PERSIST group_replication_local_address= @@GLOBAL.group_replication_local_address;
SET PERSIST group_replication_start_on_boot= ON;
SET PERSIST group_replication_recovery_get_public_key= ON;
############################################################
# 4. Restart server2, it must join the group.
# restart
include/rpl_reconnect.inc
include/gr_wait_for_member_state.inc
include/rpl_gr_wait_for_number_of_members.inc
SELECT variable_name, variable_source FROM performance_schema.variables_info WHERE variable_source IN ('PERSISTED');
variable_name variable_source
group_replication_group_name PERSISTED
group_replication_group_seeds PERSISTED
group_replication_ip_allowlist PERSISTED
group_replication_local_address PERSISTED
group_replication_recovery_get_public_key PERSISTED
group_replication_start_on_boot PERSISTED
############################################################
# 5. Clean up.
[connection server1]
RESET PERSIST;
SET GLOBAL group_replication_start_on_boot= OFF;
[connection server2]
RESET PERSIST;
SET GLOBAL group_replication_start_on_boot= OFF;
include/group_replication_end.inc
Warnings:
Warning 3615 Variable group_replication_ip_allowlist does not exist in persisted config file
Warnings:
Warning 3615 Variable group_replication_ip_allowlist does not exist in persisted config file
|