查看最大连接数 mysqladmin -uroot -p processlist 一般来说提示的thread数目就是当前的连接数 或者是登录到mysql客户端后,使用status命令也能获得thread连接数以及当前连接的id。 [root@localhost bin]# mysql -h localhost -u root -p123456 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 96718 Server version: 5.0.84 Source distribution Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement. mysql> status -------------- mysql Ver 14.12 Distrib 5.0.84, for redhat-linux-gnu (x86_64) using readline 5.1 Connection id: 96718 Current database: Current user: root@localhost SSL: Not in use Current pager: stdout Using outfile: ‘‘ Using delimiter: ; Server version: 5.0.84 Source distribution Protocol version: 10 Connection: Localhost via UNIX socket Server characterset: latin1 Db characterset: latin1 Client characterset: latin1 Conn. characterset: latin1 UNIX socket: /var/lib/mysql/mysql.sock Uptime: 1 day 17 hours 5 min 29 sec Threads: 19 Questions: 8942485 Slow queries: 0 Opens: 3496 Flush tables: 1 Open tables: 64 Queries per second avg: 60.451 --------------