SHOW SLAVE STATUS\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: mysql1
Master_User: jason
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: master-bin.000007
Read_Master_Log_Pos: 321
Relay_Log_File: mysql2-relay-bin.000002
Relay_Log_Pos: 613
Relay_Master_Log_File: master-bin.000007
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
...
Using_Gtid: Slave_Pos
SHOW GLOBAL VARIABLES LIKE '%gtid%';
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| gtid_binlog_pos | 0-1-3 |
| gtid_binlog_state | 0-1-3 |
| gtid_current_pos | 0-1-3 |
| gtid_domain_id | 0 |
| gtid_ignore_duplicates | OFF |
| gtid_slave_pos | 0-1-3 |
| gtid_strict_mode | OFF |
+------------------------+-------+
7.测试,在master节点创建数据库,并在其他两个节点进行查看:
CREATE DATABASE jjj; //主节点创建数据库
SHOW DATABASES; //从节点查看
可以看到两台从服务器都可以正常复制主服务器的数据了,试验成功。下面进行多源复制的实验,我将所有主机恢复虚拟快照至原始状态。