介绍
小编给大家分享一下mysql查看连接数的方法,希望大家阅读完这篇文章后大所收获、下面让我们一起去探讨吧!
具体方法:
查看当前连接数
。/mysql -uroot -p1234.com -e & # 39; show 状态# 39;,|,grep 小姐;,Threads Delayed_insert_threads ,, 0 Slow_launch_threads ,, 0 Threads_cached ,, 1 Threads_connected ,, 1 Threads_created ,,, 2 Threads_running ,,, 1, # #(当前连接数)
mysql>, show status like & # 39;线程% & # 39;; + - - - - - - - - - - - - - - - - - - - - - - - - - - + + |,Variable_name ,,, |, Value | + - - - - - - - - - - - - - - - - - - - - - - - - - - + + |,Threads_cached ,,, |, 1,,, | | |,Threads_connected 1,,, | | |,Threads_created 还以为;2,,,| | |,Threads_running 还以为,1,,,,|,,,# # #当前连接数 + - - - - - - - - - - - - - - - - - - - - - - - - - - + + 4,rows set 拷贝;(0.00,sec)
查看最大连接数
[root@xxx 本]#,。/mysql -uroot -p1234.com -e & # 39; show 变量# 39;,|,grep max_connections max_connections ,,, 500年
mysql>, show global variables like & # 39; max_conn % & # 39;; + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + |,Variable_name ,,,,, |, Value | + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + | |,max_connect_errors 10,,, | |,max_connections ,,, |, 500,, | # #,最大连接数 + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + 2,rows set 拷贝;(0.00,sec)
看完了这篇文章,相信你对mysql查看连接数的方法有了一定的了解,想了解更多相关知识,欢迎关注行业资讯频道,感谢各位的阅读!