Debian Codegraph @

mysql-test/suite/rpl/r/rpl_public_key.result

raw
1 #
2 # Bug#27122947: RSA PUBLIC KEY GETS CACHED ON SLAVE
3 # WHICH IS USED BY SUBSEQUENT LOGINS
4 #
5 include/master-slave.inc
6 Warnings:
7 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
8 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.
9 [connection master]
10 ==== Create new replication user ====
11 [connection master]
12 CREATE USER u27122947 IDENTIFIED WITH 'caching_sha2_password' BY 'pwd';
13 GRANT REPLICATION SLAVE ON *.* TO u27122947;
14 ==== Start using new replication user on slave ====
15 include/sync_slave_sql_with_master.inc
16 [connection slave]
17 include/stop_slave.inc
18 CHANGE REPLICATION SOURCE TO SOURCE_USER='u27122947', SOURCE_PASSWORD='pwd', SOURCE_PUBLIC_KEY_PATH='MYSQL_TEST_DIR/std_data/rsa_public_key.pem';
19 Warnings:
20 Note ### Sending passwords in plain text without SSL/TLS is extremely insecure.
21 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.
22 include/start_slave.inc
23 ==== Make sure that replication works ====
24 [connection master]
25 CREATE TABLE t1 (c1 INT);
26 INSERT INTO t1 VALUES (1);
27 include/sync_slave_sql_with_master.inc
28 [connection slave]
29 SELECT * FROM t1;
30 c1
31 1
32 ==== Stop slave and used empty values for master_public_key_path ====
33 [connection slave]
34 include/stop_slave.inc
35 CHANGE REPLICATION SOURCE TO SOURCE_USER='u27122947', SOURCE_PASSWORD='pwd', SOURCE_PUBLIC_KEY_PATH='';
36 Warnings:
37 Note ### Sending passwords in plain text without SSL/TLS is extremely insecure.
38 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.
39 ==== Remove cached password from master ====
40 [connection master]
41 FLUSH PRIVILEGES;
42 INSERT INTO t1 VALUES (2);
43 ==== Try START SLAVE on slave : I/O thread should throw error ====
44 [connection slave]
45 START SLAVE;
46 Warnings:
47 Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
48 include/wait_for_slave_io_error.inc [errno=2061]
49 ==== Try setting correct public key ====
50 [connection slave]
51 include/stop_slave.inc
52 CHANGE REPLICATION SOURCE TO SOURCE_USER='u27122947', SOURCE_PASSWORD='pwd', SOURCE_PUBLIC_KEY_PATH='MYSQL_TEST_DIR/std_data/rsa_public_key.pem';
53 Warnings:
54 Note ### Sending passwords in plain text without SSL/TLS is extremely insecure.
55 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.
56 include/start_slave.inc
57 ==== Try setting master_public_key_path to '' ====
58 [connection slave]
59 include/stop_slave.inc
60 CHANGE REPLICATION SOURCE TO SOURCE_USER='u27122947', SOURCE_PASSWORD='pwd', SOURCE_PUBLIC_KEY_PATH='';
61 Warnings:
62 Note ### Sending passwords in plain text without SSL/TLS is extremely insecure.
63 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.
64 ==== IO thread should start without issues because password is still cached ====
65 include/start_slave.inc
66 [connection master]
67 include/sync_slave_sql_with_master.inc
68 SELECT * FROM t1;
69 c1
70 1
71 2
72 ==== Reset and cleanup ====
73 [connection slave]
74 include/stop_slave.inc
75 CHANGE REPLICATION SOURCE TO SOURCE_USER = 'root', SOURCE_PASSWORD = '';
76 Warnings:
77 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
78 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.
79 include/rpl_reset.inc
80 [connection master]
81 DROP TABLE t1;
82 DROP USER u27122947;
83 include/sync_slave_sql_with_master.inc
84 include/rpl_end.inc