在my.cnf里已经加了配置max_connections=500 ---------配置但是实际在线的生产机器观察show status;
Connections === 193687--------------这个是实际链接 (linux+tomcat+mysql+java)
请问 max_connections和
show status;命令产生的 Connections 之间有什么联系和区别??
Connections === 193687--------------这个是实际链接 (linux+tomcat+mysql+java)
请问 max_connections和
show status;命令产生的 Connections 之间有什么联系和区别??
它不是当前在线的连接数。
指的是自此次服务器启动以来,所有的连接总数,包括已经关闭的连接。
mysql> show status like '%conn%';
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| Aborted_connects | 0 |
| Connections | 5 |
| Max_used_connections | 3 |
| Ssl_client_connects | 0 |
| Ssl_connect_renegotiates | 0 |
| Ssl_finished_connects | 0 |
| Threads_connected | 3 |
+--------------------------+-------+
mysql> show processlist;
+----+-----------------+----------------+-------+---------+-------+----------------------------------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+----+-----------------+----------------+-------+---------+-------+----------------------------------+------------------+
| 1 | system user | | NULL | Connect | 8492 | Waiting for master to send event | NULL |
| 2 | system user | | NULL | Connect | 18336 | Reading event from the relay log | NULL |
| 3 | event_scheduler | localhost | NULL | Daemon | 8492 | Waiting for next activation | NULL |
| 4 | root | localhost:1672 | mysql | Query | 0 | NULL | show processlist |
+----+-----------------+----------------+-------+---------+-------+----------------------------------+------------------+
4 rows in set (0.00 sec)mysql>