| 1 |
include/group_replication.inc |
| 2 |
Warnings: |
| 3 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 4 |
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. |
| 5 |
[connection server1] |
| 6 |
|
| 7 |
############################################################ |
| 8 |
# 1. Add a single server and managed sources to failover |
| 9 |
# channel 'ch1' to server1. |
| 10 |
[connection server1] |
| 11 |
CHANGE REPLICATION SOURCE TO SOURCE_HOST='10.0.0.1', SOURCE_USER='root', SOURCE_AUTO_POSITION=1, SOURCE_CONNECTION_AUTO_FAILOVER=1, SOURCE_PORT=3306, SOURCE_CONNECT_RETRY=1, SOURCE_RETRY_COUNT=1 FOR CHANNEL 'ch1'; |
| 12 |
Warnings: |
| 13 |
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 14 |
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. |
| 15 |
SELECT asynchronous_connection_failover_add_source('ch1', '10.0.0.1', 3306, '', 50); |
| 16 |
asynchronous_connection_failover_add_source('ch1', '10.0.0.1', 3306, '', 50) |
| 17 |
The UDF asynchronous_connection_failover_add_source() executed successfully. |
| 18 |
SELECT asynchronous_connection_failover_add_managed('ch1', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '10.0.0.2', 3306, '', 90, 70); |
| 19 |
asynchronous_connection_failover_add_managed('ch1', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '10.0.0.2', 3306, '', 90, 70) |
| 20 |
The UDF asynchronous_connection_failover_add_managed() executed successfully. |
| 21 |
include/assert.inc ['There are 2 rows in performance_schema.replication_asynchronous_connection_failover'] |
| 22 |
include/assert.inc ['The version of replication_asynchronous_connection_failover must be 2'] |
| 23 |
include/assert.inc ['There is 1 row in performance_schema.replication_asynchronous_connection_failover_managed'] |
| 24 |
include/assert.inc ['The version of replication_asynchronous_connection_failover_managed must be 1'] |
| 25 |
include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER must be enabled on ch1'] |
| 26 |
include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER=1 must be persisted on ch1'] |
| 27 |
SELECT * FROM performance_schema.replication_asynchronous_connection_failover; |
| 28 |
CHANNEL_NAME HOST PORT NETWORK_NAMESPACE WEIGHT MANAGED_NAME |
| 29 |
ch1 10.0.0.1 3306 50 |
| 30 |
ch1 10.0.0.2 3306 70 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa |
| 31 |
SELECT * FROM performance_schema.replication_asynchronous_connection_failover_managed; |
| 32 |
CHANNEL_NAME MANAGED_NAME MANAGED_TYPE CONFIGURATION |
| 33 |
ch1 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa GroupReplication {"Primary_weight": 90, "Secondary_weight": 70} |
| 34 |
SELECT * FROM performance_schema.replication_group_configuration_version WHERE name LIKE 'replication_asynchronous_connection_failover%'; |
| 35 |
name version |
| 36 |
replication_asynchronous_connection_failover 2 |
| 37 |
replication_asynchronous_connection_failover_managed 1 |
| 38 |
|
| 39 |
############################################################ |
| 40 |
# 2. Bootstrap the group on server1, all failover configuration |
| 41 |
# will be preserved. |
| 42 |
[connection server1] |
| 43 |
SELECT group_replication_disable_member_action("mysql_start_failover_channels_if_primary", "AFTER_PRIMARY_ELECTION"); |
| 44 |
group_replication_disable_member_action("mysql_start_failover_channels_if_primary", "AFTER_PRIMARY_ELECTION") |
| 45 |
OK |
| 46 |
include/start_and_bootstrap_group_replication.inc |
| 47 |
include/assert.inc [The action mysql_start_failover_channels_if_primary must be disabled] |
| 48 |
include/assert.inc ['There are 2 rows in performance_schema.replication_asynchronous_connection_failover'] |
| 49 |
include/assert.inc ['The version of replication_asynchronous_connection_failover must be 2'] |
| 50 |
include/assert.inc ['There is 1 row in performance_schema.replication_asynchronous_connection_failover_managed'] |
| 51 |
include/assert.inc ['The version of replication_asynchronous_connection_failover_managed must be 1'] |
| 52 |
include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER must be enabled on ch1'] |
| 53 |
include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER=1 must be persisted on ch1'] |
| 54 |
SELECT * FROM performance_schema.replication_asynchronous_connection_failover; |
| 55 |
CHANNEL_NAME HOST PORT NETWORK_NAMESPACE WEIGHT MANAGED_NAME |
| 56 |
ch1 10.0.0.1 3306 50 |
| 57 |
ch1 10.0.0.2 3306 70 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa |
| 58 |
SELECT * FROM performance_schema.replication_asynchronous_connection_failover_managed; |
| 59 |
CHANNEL_NAME MANAGED_NAME MANAGED_TYPE CONFIGURATION |
| 60 |
ch1 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa GroupReplication {"Primary_weight": 90, "Secondary_weight": 70} |
| 61 |
SELECT * FROM performance_schema.replication_group_configuration_version WHERE name LIKE 'replication_asynchronous_connection_failover%'; |
| 62 |
name version |
| 63 |
replication_asynchronous_connection_failover 2 |
| 64 |
replication_asynchronous_connection_failover_managed 1 |
| 65 |
|
| 66 |
############################################################ |
| 67 |
# 3. Join server2 to the group, it will replace its failover |
| 68 |
# configuration. |
| 69 |
[connection server2] |
| 70 |
CHANGE REPLICATION SOURCE TO SOURCE_HOST='10.0.0.1', SOURCE_USER='root', SOURCE_AUTO_POSITION=1, SOURCE_CONNECTION_AUTO_FAILOVER=0, SOURCE_PORT=3306, SOURCE_CONNECT_RETRY=1, SOURCE_RETRY_COUNT=1 FOR CHANNEL 'ch1'; |
| 71 |
Warnings: |
| 72 |
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 73 |
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. |
| 74 |
SELECT asynchronous_connection_failover_add_source('ch9', '10.0.0.19', 3306, '', 50); |
| 75 |
asynchronous_connection_failover_add_source('ch9', '10.0.0.19', 3306, '', 50) |
| 76 |
The UDF asynchronous_connection_failover_add_source() executed successfully. |
| 77 |
SELECT asynchronous_connection_failover_add_source('ch9', '10.0.0.20', 3306, '', 50); |
| 78 |
asynchronous_connection_failover_add_source('ch9', '10.0.0.20', 3306, '', 50) |
| 79 |
The UDF asynchronous_connection_failover_add_source() executed successfully. |
| 80 |
SELECT asynchronous_connection_failover_add_managed('ch9', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '10.0.0.29', 3306, '', 90, 70); |
| 81 |
asynchronous_connection_failover_add_managed('ch9', 'GroupReplication', 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa', '10.0.0.29', 3306, '', 90, 70) |
| 82 |
The UDF asynchronous_connection_failover_add_managed() executed successfully. |
| 83 |
include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER=0 must be persisted on ch1'] |
| 84 |
include/start_group_replication.inc |
| 85 |
include/assert.inc [The action mysql_start_failover_channels_if_primary must be disabled] |
| 86 |
include/assert.inc ['There are 2 rows in performance_schema.replication_asynchronous_connection_failover'] |
| 87 |
include/assert.inc ['The version of replication_asynchronous_connection_failover must be 2'] |
| 88 |
include/assert.inc ['There is 1 row in performance_schema.replication_asynchronous_connection_failover_managed'] |
| 89 |
include/assert.inc ['The version of replication_asynchronous_connection_failover_managed must be 1'] |
| 90 |
include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER must be enabled for ch1'] |
| 91 |
SELECT * FROM performance_schema.replication_asynchronous_connection_failover; |
| 92 |
CHANNEL_NAME HOST PORT NETWORK_NAMESPACE WEIGHT MANAGED_NAME |
| 93 |
ch1 10.0.0.1 3306 50 |
| 94 |
ch1 10.0.0.2 3306 70 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa |
| 95 |
SELECT * FROM performance_schema.replication_asynchronous_connection_failover_managed; |
| 96 |
CHANNEL_NAME MANAGED_NAME MANAGED_TYPE CONFIGURATION |
| 97 |
ch1 aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa GroupReplication {"Primary_weight": 90, "Secondary_weight": 70} |
| 98 |
SELECT * FROM performance_schema.replication_group_configuration_version WHERE name LIKE 'replication_asynchronous_connection_failover%'; |
| 99 |
name version |
| 100 |
replication_asynchronous_connection_failover 2 |
| 101 |
replication_asynchronous_connection_failover_managed 1 |
| 102 |
include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER must be enabled on ch1'] |
| 103 |
include/assert.inc ['SOURCE_CONNECTION_AUTO_FAILOVER=1 must be persisted on ch1'] |
| 104 |
|
| 105 |
############################################################ |
| 106 |
# 4. Clean up. |
| 107 |
[connection server1] |
| 108 |
include/rpl_reset_slave.inc |
| 109 |
[connection server2] |
| 110 |
include/rpl_reset_slave.inc |
| 111 |
include/group_replication_end.inc |