码迷,mamicode.com
首页 > 其他好文 > 详细

max_connections 与 max_used_connections --ERROR 1040: Too many connections

时间:2016-06-22 18:44:43      阅读:870      评论:0      收藏:0      [点我收藏+]

标签:

mysql> show variables like max_connections;
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 151   |
+-----------------+-------+
1 row in set (0.03 sec)

mysql> show global status like max_used_connections;
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| Max_used_connections | 1     |
+----------------------+-------+
1 row in set (0.19 sec)

secureCRT在打开一个窗口 mysql -uroot -p 登陆
mysql
> show global status like max_used_connections; +----------------------+-------+ | Variable_name | Value | +----------------------+-------+ | Max_used_connections | 2 | +----------------------+-------+ 1 row in set (0.01 sec)


MySQL比较理想的最大连接数计算方式为:

 

max_connections 与 max_used_connections --ERROR 1040: Too many connections

标签:

原文地址:http://www.cnblogs.com/zengkefu/p/5608051.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!