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. Install clone plugin on server1. [connection server1] INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN'; # 2. Configure recovery endpoints with two valid endpoints SET @@GLOBAL.group_replication_advertise_recovery_endpoints = "[::1]:SERVER1_PORT,127.0.0.1:SERVER1_PORT"; # 3. Bootstrap server1 and add some data include/start_and_bootstrap_group_replication.inc CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); # 4. Restart server2 with a monitoring process (mysqld_safe) if needed [connection server2] include/spawn_monitoring_process.inc # 5. Setup the server so group replication starts on boot # Install the Clone plugin INSTALL PLUGIN clone SONAME 'CLONE_PLUGIN'; # 6. Ensure clone is used on recovery SET GLOBAL group_replication_clone_threshold= 1; # 7. On a empty server2 start group replication [connection server2] START GROUP_REPLICATION; include/rpl_reconnect.inc include/gr_wait_for_member_state.inc # 8. Clone will fail connecting to first endpoint IPv6 and shall use IPv4 include/assert_grep.inc [clone fail setting IPv6 donor] # 9. Distributed recovery shall use first endpoint IPv6 include/assert_grep.inc [recovery channel used recovery endpoints configuration] # 10. Clone shall succeed and all data retrieved from server1 include/assert.inc [Clone must be completed] include/diff_tables.inc [server1:test.t1 ,server2:test.t1] # 11. Cleanup SET GLOBAL group_replication_clone_threshold= 9223372036854775807; RESET PERSIST IF EXISTS group_replication_group_name; RESET PERSIST IF EXISTS group_replication_local_address; RESET PERSIST IF EXISTS group_replication_group_seeds; RESET PERSIST IF EXISTS group_replication_start_on_boot; RESET PERSIST IF EXISTS group_replication_communication_stack; SET GLOBAL group_replication_start_on_boot= START_ON_BOOT_VALUE; DROP TABLE t1; include/rpl_sync.inc set session sql_log_bin=0; call mtr.add_suppression("Clone removing all user data for provisioning: Started"); call mtr.add_suppression("Clone removing all user data for provisioning: Finished"); call mtr.add_suppression("This member will start distributed recovery using clone. It is due to the number of missing transactions being higher than the configured threshold of 1."); call mtr.add_suppression(".*SET GLOBAL clone_valid_donor_list = '::1:.*' result in error.*"); call mtr.add_suppression("There was an issue when configuring the remote cloning process: Error while updating the clone donor list. Error number: 3869.*"); set session sql_log_bin=1; include/clean_monitoring_process.inc UNINSTALL PLUGIN clone; [connection server1] SET @@GLOBAL.group_replication_advertise_recovery_endpoints= "DEFAULT"; UNINSTALL PLUGIN clone; include/group_replication_end.inc