mysqladmin -uroot -proot processlist
D:\MySQL\bin>mysqladmin -uroot -proot processlist
+-----+------+----------------+---------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+----------------+---------+---------+------+-------+------------------+
| 591 | root | localhost:3544 | bbs | Sleep | 25 | | |
| 701 | root | localhost:3761 | | uery | 0 | | show processlist |
+-----+------+----------------+---------+---------+------+-------+------------------+
+-----+------+----------------+---------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+----------------+---------+---------+------+-------+------------------+
| 591 | root | localhost:3544 | bbs | Sleep | 25 | | |
| 701 | root | localhost:3761 | | uery | 0 | | show processlist |
+-----+------+----------------+---------+---------+------+-------+------------------+
2、只查看当前连接数(Threads就是连接数.):
mysqladmin -uroot -proot status
D:\MySQL\bin>mysqladmin -uroot -proot status
Uptime: 2102 Threads: 3 Questions: 15531 Slow queries: 0 Opens: 0 Flush tab
les: 1 Open tables: 61 Queries per second avg: 7.389
Uptime: 2102 Threads: 3 Questions: 15531 Slow queries: 0 Opens: 0 Flush tab
les: 1 Open tables: 61 Queries per second avg: 7.389
3、修改mysql最大连接数:
打开my.ini,修改max_connections=100(默认为100)。