mysql M-S 主从配置
观察线程列表in master:
mysql> show processlist \G;
*************************** 1. row ***************************
Id: 1
User: repl
Host: 192.168.2.23:26962
db: NULL
Command: Binlog Dump
Time: 96460
State: Master has sent all binlog to slave; waiting for binlog to be updated
Info: NULL
在主库可以看到备库I/O线程向主库发起的链接,即master的binlog dump线程
in salve :
Id: 1
User: system user
Host:
db: NULL
Command: Connect
Time: 364
State: Slave has read all relay log; waiting for the slave I/O thread to update it
Info: NULL
*************************** 2. row ***************************
Id: 2
User: system user
Host:
db: NULL
Command: Connect
Time: 96786
State: Waiting for master to send event
Info: NULL
这些简单的输出有来自一台运行了一段时间的服务器,所以I/O线程在主库和备库上的time值较大。
SQL线程已经空闲了364秒,这意味着,这364秒没有重放任何事件,当sql线程重放时候,info列可能会显示正在查询。
页:
[1]