=============== 1. first use mtr to start 2 servers [umshastr@support-cluster03:/export/home/tmp/ushastry/mysql-8.0.26/mysql-test]$ ./mtr gr_abort_query_on_plugin_error --start Logging: ./mtr gr_abort_query_on_plugin_error --start MySQL Version 8.0.26 Checking supported features Using 'all' suites Collecting tests Checking leftover processes - found old pid 3682 in 'mysqld.2.pid', killing it... process did not exist! Removing old var directory - WARNING: Using the 'mysql-test/var' symlink Creating var directory '/export/home/tmp/ushastry/mysql-8.0.26/mysql-test/var' Installing system database Using parallel: 1 ============================================================================== TEST NAME RESULT TIME (ms) COMMENT ------------------------------------------------------------------------------ worker[1] Started [mysqld.1 - pid: 5180, winpid: 5180] [mysqld.2 - pid: 5183, winpid: 5183] worker[1] Using config /export/home/tmp/ushastry/mysql-8.0.26/mysql-test/suite/group_replication/my.cnf worker[1] Port and socket path for server(s): worker[1] mysqld.1 13000 /export/home/tmp/ushastry/mysql-8.0.26/mysql-test/var/tmp/mysqld.1.sock worker[1] mysqld.2 13002 /export/home/tmp/ushastry/mysql-8.0.26/mysql-test/var/tmp/mysqld.2.sock worker[1] Waiting for server(s) to exit... =============== 2. connect 13000, and start mgr [umshastr@support-cluster03:/export/home/tmp/ushastry/mysql-8.0.26]$ bin/mysql -uroot -S /export/home/tmp/ushastry/mysql-8.0.26/mysql-test/var/tmp/mysqld.1.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.26 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> set GLOBAL group_replication_bootstrap_group=ON; Query OK, 0 rows affected (0.00 sec) mysql> set persist group_replication_group_name='aabbccdd-aabb-aabb-aabb-aabbccddeeff',persist group_replication_group_seeds='127.0.0.1:33061,127.0.0.1:33062',persist group_replication_local_address='127.0.0.1:33061';set global group_replication_consistency='eventual';CHANGE MASTER TO MASTER_USER="root" FOR CHANNEL "group_replication_recovery";start group_replication; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected, 4 warnings (0.00 sec) Query OK, 0 rows affected (2.13 sec) mysql> set GLOBAL group_replication_bootstrap_group=OFF; Query OK, 0 rows affected (0.00 sec) mysql> =============== 3. connect 13002, and start mgr [umshastr@support-cluster03:/export/home/tmp/ushastry/mysql-8.0.26]$ bin/mysql -uroot -S /export/home/tmp/ushastry/mysql-8.0.26/mysql-test/var/tmp/mysqld.2.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 8.0.26 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> set persist group_replication_group_name='aabbccdd-aabb-aabb-aabb-aabbccddeeff',persist group_replication_group_seeds='127.0.0.1:33061,127.0.0.1:33062',persist group_replication_local_address='127.0.0.1:33062';set global group_replication_consistency='eventual';CHANGE MASTER TO MASTER_USER="root" FOR CHANNEL "group_replication_recovery";start group_replication; Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected, 4 warnings (0.00 sec) Query OK, 0 rows affected (3.25 sec) mysql> select * from performance_schema.replication_group_members; +---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+ | CHANNEL_NAME | MEMBER_ID | MEMBER_HOST | MEMBER_PORT | MEMBER_STATE | MEMBER_ROLE | MEMBER_VERSION | +---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+ | group_replication_applier | 37e6f904-1605-11ec-80e2-000017016152 | 127.0.0.1 | 13000 | ONLINE | PRIMARY | 8.0.26 | | group_replication_applier | 37eeaf4b-1605-11ec-8084-000017016152 | 127.0.0.1 | 13002 | ONLINE | PRIMARY | 8.0.26 | +---------------------------+--------------------------------------+-------------+-------------+--------------+-------------+----------------+ 2 rows in set (0.01 sec) mysql> =============== 4. connect 13000, init and set gtid_next mysql> use test Database changed mysql> create table t1 (c1 int primary key, c2 int) engine=innodb; Query OK, 0 rows affected (0.01 sec) mysql> insert into t1 values (1,1); Query OK, 1 row affected (0.00 sec) mysql> show master status; +--------------------------+----------+--------------+------------------+------------------------------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +--------------------------+----------+--------------+------------------+------------------------------------------+ | server-binary-log.000001 | 1365 | | | aabbccdd-aabb-aabb-aabb-aabbccddeeff:1-4 | +--------------------------+----------+--------------+------------------+------------------------------------------+ 1 row in set (0.00 sec) mysql> set session gtid_next='aabbccdd-aabb-aabb-aabb-aabbccddeeff:5'; Query OK, 0 rows affected (0.00 sec) =============== 5. use another terminal, connect 13000, do insert [umshastr@support-cluster03:/export/home/tmp/ushastry/mysql-8.0.26]$ bin/mysql -uroot -S /export/home/tmp/ushastry/mysql-8.0.26/mysql-test/var/tmp/mysqld.1.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 22 Server version: 8.0.26 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show master status; +--------------------------+----------+--------------+------------------+------------------------------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +--------------------------+----------+--------------+------------------+------------------------------------------+ | server-binary-log.000001 | 1365 | | | aabbccdd-aabb-aabb-aabb-aabbccddeeff:1-4 | +--------------------------+----------+--------------+------------------+------------------------------------------+ 1 row in set (0.00 sec) mysql> insert into t1 values (2,2); ERROR 1046 (3D000): No database selected mysql> use test Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> insert into t1 values (2,2); Query OK, 1 row affected (0.00 sec) mysql> show master status; +--------------------------+----------+--------------+------------------+------------------------------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +--------------------------+----------+--------------+------------------+------------------------------------------+ | server-binary-log.000001 | 1655 | | | aabbccdd-aabb-aabb-aabb-aabbccddeeff:1-5 | +--------------------------+----------+--------------+------------------+------------------------------------------+ 1 row in set (0.00 sec) =============== 6. and then do query, it will not return mysql> set session group_replication_consistency='BEFORE'; Query OK, 0 rows affected (0.00 sec) mysql> select * from t1; <--- no longer blocked in 8.0.26 +----+------+ | c1 | c2 | +----+------+ | 1 | 1 | | 2 | 2 | +----+------+ 2 rows in set (0.00 sec) mysql> =============== 7. open other connect to 13000 [umshastr@support-cluster03:/export/home/tmp/ushastry/mysql-8.0.26]$ bin/mysql -uroot -S /export/home/tmp/ushastry/mysql-8.0.26/mysql-test/var/tmp/mysqld.1.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 23 Server version: 8.0.26 MySQL Community Server - GPL Copyright (c) 2000, 2021, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show processlist; +----+-----------------+-----------+------+---------+------+----------------------------------------------------------+----------------------------------+ | Id | User | Host | db | Command | Time | State | Info | +----+-----------------+-----------+------+---------+------+----------------------------------------------------------+----------------------------------+ | 5 | event_scheduler | localhost | NULL | Daemon | 439 | Waiting on empty queue | NULL | | 8 | root | localhost | test | Sleep | 7 | | NULL | | 10 | system user | | NULL | Connect | 338 | waiting for handler commit | Group replication applier module | | 13 | system user | | NULL | Query | 338 | Replica has read all relay log; waiting for more updates | NULL | | 22 | root | localhost | test | Sleep | 158 | | NULL | | 23 | root | localhost | NULL | Query | 0 | init | show processlist | +----+-----------------+-----------+------+---------+------+----------------------------------------------------------+----------------------------------+ 6 rows in set (0.00 sec) mysql>