合理计算mysql最大连接数max_connections
mysql经常出现MySQL: ERROR 1040: Too many connections,需要重新设置max_connections怎么才算合理呢?
1 查看当前mysql最大连接数
show global status like ‘Max_used_connections’;
2 设置max_connections值:Max_used_connections/max_connections=80%
mysql经常出现MySQL: ERROR 1040: Too many connections,需要重新设置max_connections怎么才算合理呢?
1 查看当前mysql最大连接数
show global status like ‘Max_used_connections’;
2 设置max_connections值:Max_used_connections/max_connections=80%