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
|
include/group_replication.inc
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 server1]
[connection server1]
# Creating a connection on the first server to be used by the recovery channel
SET sql_log_bin=0;
CREATE USER 'manish'@'%' IDENTIFIED BY 'rpl';
GRANT REPLICATION SLAVE ON *.* TO 'manish'@'%';
GRANT GROUP_REPLICATION_STREAM ON *.* TO 'manish'@'%';
FLUSH PRIVILEGES;
SET sql_log_bin=1;
CHANGE MASTER TO MASTER_USER='manish', MASTER_PASSWORD='rpl' FOR CHANNEL 'group_replication_recovery';
include/start_and_bootstrap_group_replication.inc
CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
[connection server2]
# Second CHANGE MASTER with valid options will work fine.
CHANGE REPLICATION SOURCE TO SOURCE_USER='manish', SOURCE_PASSWORD='rpl' FOR CHANNEL 'group_replication_recovery';
SET sql_log_bin=0;
CREATE USER 'manish'@'%' IDENTIFIED BY 'rpl';
GRANT REPLICATION SLAVE ON *.* TO 'manish'@'%';
GRANT GROUP_REPLICATION_STREAM ON *.* TO 'manish'@'%';
FLUSH PRIVILEGES;
SET sql_log_bin=1;
include/start_group_replication.inc
# Asserting that CHANGE MASTER is not logged in the binary log of the server 2.
Occurrences of 'CHANGE REPLICATION SOURCE' in the input file: 0
# Ensuring the the two members are online.
[connection server1]
include/rpl_gr_wait_for_number_of_members.inc
# Asserting that CHANGE MASTER is not replicated in the binary log of the server.
Occurrences of 'CHANGE REPLICATION SOURCE' in the input file: 0
[connection server2]
RESET SLAVE ALL FOR CHANNEL 'group_replication_recovery';
Warnings:
Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
SET sql_log_bin=0;
DROP USER manish;
SET sql_log_bin=1;
[connection server1]
DROP TABLE t1;
SET sql_log_bin=0;
DROP USER manish;
SET sql_log_bin=1;
include/group_replication_end.inc
|