Debian Codegraph @

mysql-test/suite/group_replication/r/gr_ssl_mysql.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 # Setup the first member with a recovery user that requires SSL
8 #
9 server1
10 set session sql_log_bin=0;
11 CREATE USER 'rec_ssl_user'@'%' REQUIRE SSL;
12 GRANT replication slave ON *.* TO 'rec_ssl_user'@'%';
13 GRANT GROUP_REPLICATION_STREAM ON *.* TO 'rec_ssl_user'@'%';
14 set session sql_log_bin=1;
15 SET GLOBAL group_replication_ssl_mode= REQUIRED;
16 #
17 # Add some data and start the member
18 #
19 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
20 INSERT INTO t1 VALUES (1);
21 include/start_and_bootstrap_group_replication.inc
22 #
23 # Configure a joining member to use SSL options on recovery and start it
24 #
25 server2
26 set session sql_log_bin=0;
27 CREATE USER 'rec_ssl_user'@'%' REQUIRE SSL;
28 GRANT replication slave ON *.* TO 'rec_ssl_user'@'%';
29 GRANT GROUP_REPLICATION_STREAM ON *.* TO 'rec_ssl_user'@'%';
30 set session sql_log_bin=1;
31 CHANGE REPLICATION SOURCE TO SOURCE_USER="rec_ssl_user" FOR CHANNEL "group_replication_recovery";
32 SET GLOBAL group_replication_recovery_use_ssl=1;
33 SET GLOBAL group_replication_recovery_ssl_ca= 'MYSQL_TEST_DIR/std_data/cacert.pem';
34 SET GLOBAL group_replication_recovery_ssl_cert= 'MYSQL_TEST_DIR/std_data/client-cert.pem';
35 SET GLOBAL group_replication_recovery_ssl_key= 'MYSQL_TEST_DIR/std_data/client-key.pem';
36 SET GLOBAL group_replication_ssl_mode= REQUIRED;
37 include/start_group_replication.inc
38 #
39 # Check the data is there
40 #
41 include/assert.inc [On the recovered member, the table should exist and have 1 elements;]
42 #
43 # Clean up
44 #
45 server1
46 set session sql_log_bin=0;
47 DROP USER 'rec_ssl_user';
48 set session sql_log_bin=1;
49 DROP TABLE t1;
50 server2
51 set session sql_log_bin=0;
52 DROP USER 'rec_ssl_user';
53 set session sql_log_bin=1;
54 include/group_replication_end.inc