查询mysql当前连接数

时间:2014-08-22 14:40:09   收藏:0   阅读:156


1.show status like ‘max‘;

   Threads_connected  当前的连接数
   Connections  试图连接到(不管是否成功)MySQL服务器的连接数。
   Max_used_connections  服务器启动后已经同时使用的连接的最大数量。


2.set GLOBAL max_connections=连接数; 
   flush privileges

 

3.修改/etc/my.cnf中的max_connections


4.show processlist   查看连接进程及连接用户

 

5.mysqladmin -u<user> -p<pwd> -h<host> status


评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!