Question
如何设置和查询MySQL的最大连接数目与当前连接数目。
Solution
- 方法1
# 查询 默认为150
show variables like '%max_connections%';
show status like 'Threads%';
# 设置
set GLOBAL max_connections=4000;
- 方法2
更改MySQSL的my.cnf
文件进行修改。
Reference
[1] mysql每秒最多能插入多少条数据 ? 死磕性能压测
[2] MySQL性能指标