查看mysql的当前连接数和host,db详细信息(图文)
1、查看当前所有连接的详细资料:
C:UsersChiHongTao>mysqladmin -uroot -proot processlist
+----+------+---------------------+-----+---------+------+-------+--------------
----+
| Id | User | Host | db | Command | Time | State | Info
|
+----+------+---------------------+-----+---------+------+-------+--------------
----+
| 48 | root | ChiHongTao-PC:51005 | abc | Sleep | 3 | |
|
| 50 | root | localhost:51008 | | Query | 0 | | show processl
ist |
+----+------+---------------------+-----+---------+------+-------+--------------
----+
2、只查看当前连接数(Threads就是连接数.):
mysqladmin -uroot -proot status
3、修改mysql最大连接数:
打开my.ini,修改max_connections=100