| 1 |
# ---------------------------------------------------------------------- |
| 2 |
# Setup |
| 3 |
include/master-slave.inc |
| 4 |
Warnings: |
| 5 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 6 |
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. |
| 7 |
[connection master] |
| 8 |
# Creating local configuration file for keyring component: component_keyring_file |
| 9 |
# Creating manifest file for current MySQL server instance |
| 10 |
[connection slave] |
| 11 |
# Creating local configuration file for keyring component: component_keyring_file |
| 12 |
# Creating manifest file for current MySQL server instance |
| 13 |
[connection master] |
| 14 |
# ---------------------------------------------------------------------- |
| 15 |
[connection slave] |
| 16 |
[connection master] |
| 17 |
# Part 1 |
| 18 |
SET @@GLOBAL.binlog_encryption = ON; |
| 19 |
ERROR HY000: Unable to recover binlog encryption master key, please check if keyring is loaded. |
| 20 |
include/assert.inc [binlog_encryption option shall be OFF] |
| 21 |
include/assert.inc [Binary log was not rotated] |
| 22 |
include/assert.inc [Binary log is not encrypted] |
| 23 |
include/assert.inc [1st binary log is not encrypted on master] |
| 24 |
include/rpl_stop_server.inc [server_number=1] |
| 25 |
# Taking backup of local manifest file for MySQL server instance |
| 26 |
Starting the server with "--binlog_encryption=ON" but no keyring installed |
| 27 |
include/assert_grep.inc [Server failed to initialize binlog encryption] |
| 28 |
include/assert_grep.inc [Server aborted to start] |
| 29 |
# Part 2 |
| 30 |
# Restore local manifest file for MySQL server instance from backup |
| 31 |
Starting the master with "--binlog_encryption=ON" and keyring installed |
| 32 |
include/rpl_start_server.inc [server_number=1] |
| 33 |
include/assert.inc [binlog_encryption option shall be ON] |
| 34 |
include/assert.inc [2nd binary log is encrypted on master] |
| 35 |
include/assert.inc [Binary log is encrypted using 1st master key] |
| 36 |
include/assert.inc [Binary log rotated as expected at master startup] |
| 37 |
SET PERSIST binlog_encryption = ON; |
| 38 |
Restart the master with keyring installed |
| 39 |
include/rpl_restart_server.inc [server_number=1] |
| 40 |
include/assert.inc [binlog_encryption option shall be ON] |
| 41 |
include/assert.inc [3rd binary log is encrypted on master] |
| 42 |
include/assert.inc [Binary log is encrypted using 1st master key] |
| 43 |
include/assert.inc [Binary log rotated as expected at master startup] |
| 44 |
[connection slave] |
| 45 |
include/assert.inc [1st binary log is not encrypted on slave] |
| 46 |
include/assert.inc [Relay log is not encrypted for slave-relay-bin.000001] |
| 47 |
Restart the slave with keyring installed |
| 48 |
include/rpl_restart_server.inc [server_number=2] |
| 49 |
include/assert.inc [binlog_encryption option shall be OFF] |
| 50 |
include/assert.inc [2nd binary log is not encrypted on slave] |
| 51 |
include/assert.inc [Relay log is not encrypted for slave-relay-bin.000002] |
| 52 |
SET GLOBAL binlog_encryption = ON; |
| 53 |
include/assert.inc [binlog_encryption option shall be ON] |
| 54 |
include/assert.inc [3rd binary log is encrypted on slave] |
| 55 |
include/assert.inc [Binary log rotated as expected at server startup] |
| 56 |
include/assert.inc [New binary log is encrypted using 1st master key] |
| 57 |
include/assert.inc [Relay log rotated as expected at server startup] |
| 58 |
include/assert.inc [Relay log is encrypted for slave-relay-bin.000003] |
| 59 |
# Adding debug point 'verify_unusable_encryption_keys_are_purged' to @@GLOBAL.debug |
| 60 |
ALTER INSTANCE ROTATE BINLOG MASTER KEY; |
| 61 |
# Removing debug point 'verify_unusable_encryption_keys_are_purged' from @@GLOBAL.debug |
| 62 |
include/assert.inc [The third relay log is re-encrypted using second master key] |
| 63 |
include/assert.inc [The after relay log is encrypted using second master key] |
| 64 |
# Part 3 |
| 65 |
[connection master] |
| 66 |
CREATE TABLE t1 (c1 INT PRIMARY KEY); |
| 67 |
INSERT INTO t1 (c1) VALUES (1), (2), (3); |
| 68 |
INSERT INTO t1 (c1) VALUES (4), (5), (6); |
| 69 |
[connection slave] |
| 70 |
include/start_slave.inc |
| 71 |
[connection master] |
| 72 |
include/sync_slave_sql_with_master.inc |
| 73 |
# Part 4 |
| 74 |
[connection slave] |
| 75 |
# Taking backup of local keyring file for keyring component: component_keyring_file |
| 76 |
ALTER INSTANCE RELOAD KEYRING; |
| 77 |
SET GLOBAL keyring_operations = OFF; |
| 78 |
[connection master] |
| 79 |
include/sync_slave_sql_with_master.inc |
| 80 |
FLUSH LOGS; |
| 81 |
include/assert.inc [5th binary log is encrypted on slave] |
| 82 |
include/assert.inc [Binary log rotated as expected by the FLUSH LOGS] |
| 83 |
include/assert.inc [New binary log is still encrypted] |
| 84 |
include/wait_for_slave_sql_error.inc [errno=13121] |
| 85 |
include/stop_slave_io.inc |
| 86 |
RESET SLAVE ALL; |
| 87 |
Warnings: |
| 88 |
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead |
| 89 |
include/assert.inc [New relay log is still encrypted] |
| 90 |
CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_PORT=MASTER_MYPORT, SOURCE_USER='root'; |
| 91 |
Warnings: |
| 92 |
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 93 |
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. |
| 94 |
include/assert.inc [New relay log is still encrypted] |
| 95 |
START SLAVE SQL_THREAD; |
| 96 |
Warnings: |
| 97 |
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead |
| 98 |
include/wait_for_slave_sql_error.inc [errno=13117] |
| 99 |
SET GLOBAL binlog_encryption = OFF; |
| 100 |
include/assert.inc [6th binary log is not encrypted on slave] |
| 101 |
include/assert.inc [Binary log rotated as expected when disabling the option] |
| 102 |
include/assert.inc [New binary log is not encrypted] |
| 103 |
RESET SLAVE ALL; |
| 104 |
Warnings: |
| 105 |
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead |
| 106 |
include/assert.inc [New relay log is not encrypted] |
| 107 |
CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_PORT=MASTER_MYPORT, SOURCE_USER='root'; |
| 108 |
Warnings: |
| 109 |
Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 110 |
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. |
| 111 |
include/assert.inc [New relay log is not encrypted] |
| 112 |
include/start_slave.inc |
| 113 |
# Restoring local keyring file from backup for keyring component: component_keyring_file |
| 114 |
[connection master] |
| 115 |
third_binary_log: master-bin.000003 |
| 116 |
include/assert.inc [the third binary log is encrypted using first master key] |
| 117 |
# Part 5 |
| 118 |
# Adding debug point 'verify_unusable_encryption_keys_are_purged' to @@GLOBAL.debug |
| 119 |
ALTER INSTANCE ROTATE BINLOG MASTER KEY; |
| 120 |
# Removing debug point 'verify_unusable_encryption_keys_are_purged' from @@GLOBAL.debug |
| 121 |
include/assert.inc [the fourth binary log is encrypted on master] |
| 122 |
include/assert.inc [the third binary log is re-encrypted using second master key] |
| 123 |
include/assert.inc [the fourth binary log is encrypted using second master key] |
| 124 |
SET PERSIST binlog_encryption = OFF; |
| 125 |
include/assert.inc [5th binary log is not encrypted on master] |
| 126 |
ALTER INSTANCE ROTATE BINLOG MASTER KEY; |
| 127 |
ERROR HY000: Cannot rotate binary log master key when 'binlog-encryption' is off. |
| 128 |
RESET PERSIST; |
| 129 |
[connection master] |
| 130 |
DROP TABLE t1; |
| 131 |
include/sync_slave_sql_with_master.inc |
| 132 |
[connection master] |
| 133 |
SET GLOBAL binlog_encryption= OFF; |
| 134 |
[connection slave] |
| 135 |
SET GLOBAL keyring_operations= ON; |
| 136 |
# ---------------------------------------------------------------------- |
| 137 |
# Teardown |
| 138 |
# Removing manifest file for current MySQL server instance |
| 139 |
# Removing manifest file for current MySQL server instance |
| 140 |
# Removing local keyring file for keyring component: component_keyring_file |
| 141 |
# Removing local keyring file for keyring component: component_keyring_file |
| 142 |
# Removing local configuration file for keyring component: component_keyring_file |
| 143 |
# Removing local configuration file for keyring component: component_keyring_file |
| 144 |
include/rpl_end.inc |
| 145 |
# Restarting server without the manifest file |
| 146 |
# ---------------------------------------------------------------------- |