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 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
include/group_replication.inc [rpl_server_count=4]
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]
[connection server5]
SET SESSION sql_log_bin = 0;
call mtr.add_suppression("The source.*for channel.*has joined the group.*and so added its entry into replication_asynchronous_connection_failover table");
call mtr.add_suppression("The source.*for channel.*has left the group.*and so removed its entry from replication_asynchronous_connection_failover table");
call mtr.add_suppression("The IO thread detected that the source .* does not belong to the group majority, thence the channel .* will try to connect to another source.");
call mtr.add_suppression("The Monitor IO thread detected that the source .* does not belong to the group majority, thence the channel .* will try to connect to another source.");
call mtr.add_suppression("The group .* for the channel .* has been added, and so added its entry in replication_asynchronous_connection_failover_managed and source to replication_asynchronous_connection_failover table.");
call mtr.add_suppression("The Monitor IO thread failed to detect if the source belongs to the group majority on the source .* for channel 'ch1_5'.");
SET SESSION sql_log_bin = 1;
# 1. Configure first group members: server1 and 2.
[connection server1]
SET GLOBAL group_replication_group_seeds= "GROUP_REPLICATION_GROUP_SEEDS";
SET GLOBAL group_replication_group_name= "GROUP_REPLICATION_GROUP_NAME";
SET GLOBAL group_replication_group_seeds= "GROUP_REPLICATION_GROUP_SEEDS";
SET GLOBAL group_replication_group_name= "GROUP_REPLICATION_GROUP_NAME";
# 2. Start GR on first group members: server1 and 2.
[connection server1]
include/start_and_bootstrap_group_replication.inc
[connection server2]
include/start_group_replication.inc
# 3. Configure second group members: server3 and 4.
SET GLOBAL group_replication_group_seeds= "GROUP_REPLICATION_GROUP_SEEDS";
SET GLOBAL group_replication_group_name= "GROUP_REPLICATION_GROUP_NAME";
SET GLOBAL group_replication_group_seeds= "GROUP_REPLICATION_GROUP_SEEDS";
SET GLOBAL group_replication_group_name= "GROUP_REPLICATION_GROUP_NAME";
# 4. Start GR on second group members: server3 and 4.
[connection server3]
include/start_and_bootstrap_group_replication.inc
[connection server4]
include/start_group_replication.inc
# 5. Create and start new channel ch1_5: server5(slave), server1(master)
# and verify channel ch1_5 IO and SQL THREADS are ON.
[connection server5]
CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_USER='root', SOURCE_AUTO_POSITION=1, SOURCE_CONNECTION_AUTO_FAILOVER=1, SOURCE_PORT=SERVER_1_PORT, SOURCE_CONNECT_RETRY=1, SOURCE_RETRY_COUNT=2 for channel 'ch1_5';
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 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.
include/start_slave.inc [FOR CHANNEL 'ch1_5']
include/assert.inc [Verify channel ch1_5 IO_THREAD is ON]
include/assert.inc [Verify channel ch1_5 SQL_THREAD is ON]
#
# 6. Add two asynchronous connection failover servers from two different
# groups and verify that they are inserted successfully in
# performance_schema.replication_asynchronous_connection_failover.
#
[connection server2]
[connection server4]
[connection server5]
SELECT asynchronous_connection_failover_add_managed('ch1_5', 'GroupReplication', 'GROUP_NAME', '127.0.0.1', SERVER_MYPORT_2, '', 70, 60);;
asynchronous_connection_failover_add_managed('ch1_5', 'GroupReplication', 'GROUP_NAME', '127.0.0.1', SERVER_MYPORT_2, '', 70, 60)
The UDF asynchronous_connection_failover_add_managed() executed successfully.
SELECT asynchronous_connection_failover_add_managed('ch1_5', 'GroupReplication', 'GROUP_NAME', '127.0.0.1', SERVER_MYPORT_4, '', 80, 60);;
asynchronous_connection_failover_add_managed('ch1_5', 'GroupReplication', 'GROUP_NAME', '127.0.0.1', SERVER_MYPORT_4, '', 80, 60)
The UDF asynchronous_connection_failover_add_managed() executed successfully.
include/assert_grep.inc ['There are two rows in performance_schema.replication_asynchronous_connection_failover']
# 7. Verify four senders are added automatically to
# replication_asynchronous_connection_failover table.
[connection server5]
# 8. Verify it gets reconnected to source with highest
# weight which will be server3.
[connection server5]
# 9. Clean Up.
[connection server3]
CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_USER='root', SOURCE_PORT=SERVER_1_PORT FOR CHANNEL 'ch1_3';
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 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.
include/start_slave.inc [FOR CHANNEL 'ch1_3']
[connection server1]
CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_USER='root', SOURCE_PORT=SERVER_3_PORT FOR CHANNEL 'ch3_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 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.
include/start_slave.inc [FOR CHANNEL 'ch3_1']
include/sync_slave_sql_with_master.inc
include/sync_slave_sql_with_master.inc
include/sync_slave_sql_with_master.inc
include/stop_group_replication.inc
include/stop_group_replication.inc
include/stop_group_replication.inc
include/stop_group_replication.inc
[connection server5]
include/stop_slave.inc [FOR CHANNEL 'ch1_5']
include/rpl_reset_slave.inc
SELECT asynchronous_connection_failover_delete_managed('ch1_5', 'GROUP_NAME1');
asynchronous_connection_failover_delete_managed('ch1_5', 'GROUP_NAME1')
The UDF asynchronous_connection_failover_delete_managed() executed successfully.
SELECT asynchronous_connection_failover_delete_managed('ch1_5', 'GROUP_NAME2');
asynchronous_connection_failover_delete_managed('ch1_5', 'GROUP_NAME2')
The UDF asynchronous_connection_failover_delete_managed() executed successfully.
[connection server3]
include/stop_slave.inc [FOR CHANNEL 'ch1_3']
Warnings:
Note 3084 Replication thread(s) for channel 'ch1_3' are already stopped.
include/rpl_reset_slave.inc
[connection server1]
include/stop_slave.inc [FOR CHANNEL 'ch3_1']
Warnings:
Note 3084 Replication thread(s) for channel 'ch3_1' are already stopped.
include/rpl_reset_slave.inc
include/group_replication_end.inc
|