mysql怎么查看连接数[mysql基础教程]
具体方法:
(推荐教程:mysql数据库学习" title="mysql数据库学习">mysql数据库学习教程)
查看当前连接数
./mysql -uroot -p1234.com -e 'show status' | grep -i ThreadsDelayed_insert_threads 0
Slow_launch_threads 0
Threads_cached 1
Threads_connected 1
Threads_created 2
Threads_running 1 ##(当前连接数)
mysql> show status like 'Threads%';+-------------------+-------+
| Variable_name | Value |
+-------------------+-------+
| Threads_cached | 1 |
| Threads_connected | 1 |
| Threads_created | 2 |
| Threads_running | 1 | ###当前连接数
+-------------------+-------+
4 rows in set (0.00 sec)
查看最大连接数
[root@xxx bin]# ./mysql -uroot -p1234.com -e 'show variables' | grep max_connectionsmax_connections 500
mysql> show global variables like 'max_conn%';+--------------------+-------+
| Variable_name | Value |
+--------------------+-------+
| max_connect_errors | 10 |
| max_connections | 500 |## 最大连接数
+--------------------+-------+
2 rows in set (0.00 sec)
以上是 mysql怎么查看连接数[mysql基础教程] 的全部内容, 来源链接: utcz.com/z/528889.html