Debian Codegraph @

mysql-test/suite/group_replication/r/gr_recovery_ssl_and_ssl_mode.result

raw
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. Setup the members with a recovery user that does
9 # require SSL.
10 [connection server1]
11 SET SESSION sql_log_bin=0;
12 CREATE USER 'rec_ssl_user'@'%' REQUIRE SSL;
13 GRANT replication slave ON *.* TO 'rec_ssl_user'@'%';
14 GRANT GROUP_REPLICATION_STREAM ON *.* TO 'rec_ssl_user'@'%';
15 FLUSH PRIVILEGES;
16 SET SESSION sql_log_bin=1;
17 [connection server2]
18 SET SESSION sql_log_bin=0;
19 CREATE USER 'rec_ssl_user'@'%' REQUIRE SSL;
20 GRANT replication slave ON *.* TO 'rec_ssl_user'@'%';
21 GRANT GROUP_REPLICATION_STREAM ON *.* TO 'rec_ssl_user'@'%';
22 FLUSH PRIVILEGES;
23 SET SESSION sql_log_bin=1;
24 CHANGE REPLICATION SOURCE TO SOURCE_USER="rec_ssl_user" FOR CHANNEL "group_replication_recovery";
25
26 ############################################################
27 # 2. Start Group Replication on both members and assert that
28 # GCS SSL is enabled.
29 [connection server1]
30 include/start_and_bootstrap_group_replication.inc
31 Occurrences of 'Group communication SSL configuration: group_replication_ssl_mode: "REQUIRED"' in the input file: 1
32 [connection server2]
33 include/start_group_replication.inc
34 Occurrences of 'Group communication SSL configuration: group_replication_ssl_mode: "REQUIRED"' in the input file: 1
35
36 ############################################################
37 # 3. Stop and start Group Replication on member 2 to stress
38 # SSL destroy and initialization procedures
39 [connection server2]
40 include/stop_group_replication.inc
41 include/start_group_replication.inc
42 Occurrences of 'Group communication SSL configuration: group_replication_ssl_mode: "REQUIRED"' in the input file: 2
43
44 ############################################################
45 # 4. Execute some transactions to validate that group is
46 # properly working.
47 [connection server1]
48 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
49 INSERT INTO t1 VALUES (1);
50 include/rpl_sync.inc
51 [connection server2]
52 INSERT INTO t1 VALUES (2);
53 include/rpl_sync.inc
54 [connection server1]
55 include/assert.inc ['There are 2 values on table t1']
56 [connection server2]
57 include/assert.inc ['There are 2 values on table t1']
58
59 ############################################################
60 # 5. Clean up.
61 [connection server1]
62 DROP TABLE t1;
63 SET SESSION sql_log_bin=0;
64 DROP USER 'rec_ssl_user';
65 SET SESSION sql_log_bin=1;
66 [connection server2]
67 SET SESSION sql_log_bin=0;
68 DROP USER 'rec_ssl_user';
69 SET SESSION sql_log_bin=1;
70 include/group_replication_end.inc