2.1.20.1 查询流量控制当前配置状态
mysql> flow_control @@show;
+---------------------+--------------------+------------------+
| FLOW_CONTROL_ENABLE | FLOW_CONTROL_START | FLOW_CONTROL_END |
+---------------------+--------------------+------------------+
| false | 4096 | 256 |
+---------------------+--------------------+------------------+
1 row in set (0.00 sec)
列描述:
+ FLOW_CONTROL_ENABLE 是否有开启流量控制功能
+ FLOW_CONTROL_START 流量控制功能触发值
+ FLOW_CONTROL_END 流量控制功能取消值
2.1.20.2 修改流量控制当前配置状态
flow_control @@set [enableFlowControl = true/false] [flowControlStart = ?] [flowControlEnd = ?]
MySQL [(none)]> flow_control @@set enableFlowControl = true flowControlStart= 100 flowControlEND = 30;
Query OK, 0 rows affected (0.02 sec)
通过此命令可以修改对应内存中生效的值,不会影响配置文件,对应关系如下:
+ enableFlowControl: bootstrap.cnf中enableFlowControl参数
+ flowControlStart:bootstrap.cnf中flowControlStartThreshold参数
+ flowControlEnd:bootstrap.cnf中flowControlStopThreshold参数
注:以上命令三个参数顺序相关
2.1.20.3 查看当前流量控制中的连接
``` MySQL [(none)]> flow_control @@list; +------------------+---------------+------------------------------------+------------------+ | CONNECTION_TYPE | CONNECTION_ID | CONNECTION_INFO | WRITE_QUEUE_SIZE | +------------------+---------------+------------------------------------+------------------+ | ServerConnection | 2 | 127.0.0.1:60772/testdb user = root | 2920 | +------------------+---------------+------------------------------------+------------------+
``` 列描述: + CONNECTION_TYPE 连接的类型MySQLConnection/ServerConnection + CONNECTION_ID 连接在dble中的ID信息,可以通过ID查找日志 + CONNECTION_INFO 连接详细信息,使用端口,IP地址,用户,MySQL中的连接ID等 + WRITE_QUEUE_SIZE 当前连接的写队列长度




