Server IP : 172.67.216.182 / Your IP : 162.158.88.109 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/mysql-test/suite/group_replication/r/ |
Upload File : |
include/group_replication.inc [rpl_server_count=6] Warnings: Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. Note #### Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. [connection server1] ################################################################# # 1. Setup Group Replication on M1 and M2 and create group GR1. SET @@GLOBAL.group_replication_group_seeds= ""; include/start_and_bootstrap_group_replication.inc SET @@GLOBAL.group_replication_group_seeds= "GROUP_REPLICATION_GROUP_SEEDS"; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc ################################################################# # 2. Setup Group Replication on M1 and M2 and create group GR2. SET @@GLOBAL.group_replication_group_seeds= ""; include/start_and_bootstrap_group_replication.inc SET @@GLOBAL.group_replication_group_seeds= "GROUP_REPLICATION_GROUP_SEEDS"; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc ############################################################### # 3. Setup a asynchronous replication connection from M3 (GR2) # to M1 (GR1). CHANGE MASTER TO MASTER_HOST="127.0.0.1", MASTER_USER="root", MASTER_PASSWORD="", MASTER_PORT=SERVER_3_PORT, MASTER_AUTO_POSITION=1; Warnings: Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. Note 1760 Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. include/start_slave.inc ############################################################### # 4. Setup a asynchronous replication connection from M1 (GR1) # to M3 (GR2). CHANGE MASTER TO MASTER_HOST="127.0.0.1", MASTER_USER="root", MASTER_PASSWORD="", MASTER_PORT=SERVER_1_PORT, MASTER_AUTO_POSITION=1; Warnings: Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. Note 1760 Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information. include/start_slave.inc ############################################################### # 5. Test view change issue by adding/dropping nodes from the # groups (just to generate more VIEW_EVENTs). # 5.1. Add a node M5 to group (GR1). SET @@GLOBAL.group_replication_group_seeds= "GROUP_REPLICATION_GROUP_SEEDS"; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc ################################################################ # 5.2. Add and immediately drop a node M6 to group (GR2). SET @@GLOBAL.group_replication_group_seeds= "GROUP_REPLICATION_GROUP_SEEDS"; include/start_group_replication.inc include/rpl_gr_wait_for_number_of_members.inc include/stop_group_replication.inc ############################################################ # 6. Execute some transactions on M3 (GR2). CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t1 VALUES (0); INSERT INTO t1 VALUES (1); UPDATE t1 SET c1=2 WHERE c1=0; DELETE FROM t1 WHERE c1=1; ############################################################ # 7. Wait until transactions executed on M3 are applied # on all nodes in both groups. include/sync_slave_sql_with_master.inc include/sync_slave_sql_with_master.inc include/sync_slave_sql_with_master.inc include/sync_slave_sql_with_master.inc ############################################################ # 8. Execute some transactions on M1 (GR1). CREATE TABLE t2 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB; INSERT INTO t2 VALUES (0); INSERT INTO t2 VALUES (1); UPDATE t2 SET c1=2 WHERE c1=0; DELETE FROM t2 WHERE c1=1; ############################################################ # 9. Wait until transactions executed on M1 are applied # on all nodes in both groups. include/sync_slave_sql_with_master.inc include/sync_slave_sql_with_master.inc include/sync_slave_sql_with_master.inc include/sync_slave_sql_with_master.inc ######################################################################### # 10. Validate data on all nodes (M1, M2, M3, M4 and M5) include/diff_tables.inc [server_1:t1, server_2:t1, server_3:t1, server_4:t1, server_5:t1] include/diff_tables.inc [server_1:t2, server_2:t2, server_3:t2, server_4:t2, server_5:t2] ######################################################################### # 11. Check that GTID_EXECUTED on all servers are as expected. SET SESSION sql_log_bin= 0; include/gtid_utils.inc SET SESSION sql_log_bin= 1; include/assert.inc [Check that GTID_EXECUTED set on all servers are as expected.] SET SESSION sql_log_bin= 0; include/gtid_utils_end.inc SET SESSION sql_log_bin= 1; SET SESSION sql_log_bin= 0; include/gtid_utils.inc SET SESSION sql_log_bin= 1; include/assert.inc [Check that GTID_EXECUTED set on all servers are as expected.] SET SESSION sql_log_bin= 0; include/gtid_utils_end.inc SET SESSION sql_log_bin= 1; SET SESSION sql_log_bin= 0; include/gtid_utils.inc SET SESSION sql_log_bin= 1; include/assert.inc [Check that GTID_EXECUTED set on all servers are as expected.] SET SESSION sql_log_bin= 0; include/gtid_utils_end.inc SET SESSION sql_log_bin= 1; SET SESSION sql_log_bin= 0; include/gtid_utils.inc SET SESSION sql_log_bin= 1; include/assert.inc [Check that GTID_EXECUTED set on all servers are as expected.] SET SESSION sql_log_bin= 0; include/gtid_utils_end.inc SET SESSION sql_log_bin= 1; SET SESSION sql_log_bin= 0; include/gtid_utils.inc SET SESSION sql_log_bin= 1; include/assert.inc [Check that GTID_EXECUTED set on all servers are as expected.] SET SESSION sql_log_bin= 0; include/gtid_utils_end.inc SET SESSION sql_log_bin= 1; ############################################################ # 12. Clean data. DROP TABLE t1; DROP TABLE t2; include/sync_slave_sql_with_master.inc include/sync_slave_sql_with_master.inc include/sync_slave_sql_with_master.inc include/sync_slave_sql_with_master.inc ############################################################## # 13. Stop asynchronous replication between M3->M1 and M1->M3. include/stop_slave.inc CHANGE MASTER TO MASTER_AUTO_POSITION=0 FOR CHANNEL ""; include/stop_slave.inc CHANGE MASTER TO MASTER_AUTO_POSITION=0 FOR CHANNEL ""; ############################################################ # 14. Stop Group Replication on all 5 nodes. include/stop_group_replication.inc include/stop_group_replication.inc include/stop_group_replication.inc include/stop_group_replication.inc include/stop_group_replication.inc include/group_replication_end.inc