Master节点的线程状态 mysql> show processlist\G ERROR 2006 (HY000): MySQL server has gone away No connection. Trying to reconnect... Connection id: 4 Current database: *** NONE ***
*************************** 1. row *************************** Id: 2 User: repl Host: 192.168.78.137:42524 db: NULL Command: Binlog Dump Time: 63044 State: Master has sent all binlog to slave; waiting for binlog to be updated Info: NULL
Slave节点的线程状态 mysql> show processlist\G *************************** 1. row *************************** Id: 2 User: system user Host: db: NULL Command: Connect Time: 62933 State: Waiting for master to send event Info: NULL *************************** 2. row *************************** Id: 3 User: system user Host: db: NULL Command: Connect Time: 62831 State: Slave has read all relay log; waiting for the slave I/O thread to update it Info: NULL
3、显示当前有多少个Slave节点注册到Master节点,在Master节点执行 mysql> SHOW SLAVE HOSTS; +-----------+------+------+-----------+ | Server_id | Host | Port | Master_id | +-----------+------+------+-----------+ | 200 | | 3306 | 100 | +-----------+------+------+-----------+ 1 row in set (0.00 sec)