1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
|
include/rpl_init.inc [topology=3->2,1->2]
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
Warnings:
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
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.
[connection server_2]
SET @save.replica_parallel_workers= @@global.replica_parallel_workers;
# Test for Single Threaded Slave
SET GLOBAL replica_parallel_workers= 0;
Warnings:
Warning 1287 '0' is deprecated and will be removed in a future release. Please use 1 instead
START SLAVE;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
# 1) Create a database on server_1.
[connection server_1]
CREATE DATABASE db1;
# 2) create database on server_3.
[connection server_3]
CREATE DATABASE db3;
# 3) sync the slave (server_2) with both masters (server_1 and server_3).
[connection server_1]
include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1']
[connection server_3]
include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_3']
include/stop_slave.inc [FOR CHANNEL 'channel_3']
include/start_slave.inc [FOR CHANNEL 'channel_3']
SELECT CHANNEL_NAME FROM performance_schema.replication_applier_configuration;
CHANNEL_NAME
channel_3
channel_1
SELECT CHANNEL_NAME FROM performance_schema.replication_applier_configuration ORDER BY CHANNEL_NAME;
CHANNEL_NAME
channel_1
channel_3
SELECT CHANNEL_NAME FROM performance_schema.replication_applier_status;
CHANNEL_NAME
channel_3
channel_1
SELECT CHANNEL_NAME FROM performance_schema.replication_applier_status ORDER BY CHANNEL_NAME;
CHANNEL_NAME
channel_1
channel_3
SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_connection_status;
CHANNEL_NAME LAST_ERROR_MESSAGE
channel_3
channel_1
SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_connection_status ORDER BY CHANNEL_NAME;
CHANNEL_NAME LAST_ERROR_MESSAGE
channel_1
channel_3
SELECT CHANNEL_NAME, TLS_VERSION FROM performance_schema.replication_connection_configuration;
CHANNEL_NAME TLS_VERSION
channel_3
channel_1
SELECT CHANNEL_NAME, TLS_VERSION FROM performance_schema.replication_connection_configuration ORDER BY CHANNEL_NAME;
CHANNEL_NAME TLS_VERSION
channel_1
channel_3
SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_worker;
CHANNEL_NAME LAST_ERROR_MESSAGE
channel_3
channel_1
SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_worker ORDER BY CHANNEL_NAME;
CHANNEL_NAME LAST_ERROR_MESSAGE
channel_1
channel_3
[connection server_1]
DROP DATABASE db1;
[connection server_3]
DROP DATABASE db3;
[connection server_1]
include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1']
[connection server_3]
include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_3']
# Test for Multi Threaded Slave
STOP SLAVE;
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
SET GLOBAL replica_parallel_workers = 2;
START SLAVE;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
# 1) Create a database on server_1.
[connection server_1]
CREATE DATABASE db1;
# 2) create database on server_3.
[connection server_3]
CREATE DATABASE db3;
# 3) sync the slave (server_2) with both masters (server_1 and server_3).
[connection server_1]
include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1']
[connection server_3]
include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_3']
include/stop_slave.inc [FOR CHANNEL 'channel_3']
include/start_slave.inc [FOR CHANNEL 'channel_3']
SELECT CHANNEL_NAME FROM performance_schema.replication_applier_configuration;
CHANNEL_NAME
channel_3
channel_1
SELECT CHANNEL_NAME FROM performance_schema.replication_applier_configuration ORDER BY CHANNEL_NAME;
CHANNEL_NAME
channel_1
channel_3
SELECT CHANNEL_NAME FROM performance_schema.replication_applier_status;
CHANNEL_NAME
channel_3
channel_1
SELECT CHANNEL_NAME FROM performance_schema.replication_applier_status ORDER BY CHANNEL_NAME;
CHANNEL_NAME
channel_1
channel_3
SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_connection_status;
CHANNEL_NAME LAST_ERROR_MESSAGE
channel_3
channel_1
SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_connection_status ORDER BY CHANNEL_NAME;
CHANNEL_NAME LAST_ERROR_MESSAGE
channel_1
channel_3
SELECT CHANNEL_NAME, TLS_VERSION FROM performance_schema.replication_connection_configuration;
CHANNEL_NAME TLS_VERSION
channel_3
channel_1
SELECT CHANNEL_NAME, TLS_VERSION FROM performance_schema.replication_connection_configuration ORDER BY CHANNEL_NAME;
CHANNEL_NAME TLS_VERSION
channel_1
channel_3
SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_coordinator;
CHANNEL_NAME LAST_ERROR_MESSAGE
channel_3
channel_1
SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_coordinator ORDER BY CHANNEL_NAME;
CHANNEL_NAME LAST_ERROR_MESSAGE
channel_1
channel_3
SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_worker;
CHANNEL_NAME LAST_ERROR_MESSAGE
channel_3
channel_3
channel_1
channel_1
SELECT CHANNEL_NAME, LAST_ERROR_MESSAGE FROM performance_schema.replication_applier_status_by_worker ORDER BY CHANNEL_NAME;
CHANNEL_NAME LAST_ERROR_MESSAGE
channel_1
channel_1
channel_3
channel_3
[connection server_1]
DROP DATABASE db1;
[connection server_3]
DROP DATABASE db3;
[connection server_1]
include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_1']
[connection server_3]
include/sync_slave_sql_with_master.inc [FOR CHANNEL 'channel_3']
STOP SLAVE;
Warnings:
Warning 1287 'STOP SLAVE' is deprecated and will be removed in a future release. Please use STOP REPLICA instead
SET @@global.replica_parallel_workers= @save.replica_parallel_workers;
START SLAVE;
Warnings:
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead
include/rpl_end.inc
RESET REPLICA ALL FOR CHANNEL 'channel_3';
RESET REPLICA ALL FOR CHANNEL 'channel_1';
|