show status和show variables区别解析
1.show status????查看系統(tǒng)運(yùn)行的實(shí)時(shí)狀態(tài),便于dba查看mysql當(dāng)前運(yùn)行的狀態(tài),做出相應(yīng)優(yōu)化,動(dòng)態(tài)的,不可認(rèn)為修改,只能系統(tǒng)自動(dòng)update。
MariaDB [(none)]> show status like '%conn%';
+--------------------------+----------+
| Variable_name ? ? ? ? ? ?| Value ? ?|
+--------------------------+----------+
| Aborted_connects ? ? ? ? | 101 ? ? ?|? ?---- 中斷連接數(shù)
| Connections ? ? ? ? ? ? ?| 11066535 |????---- 總共的連接數(shù)
| Max_used_connections ? ? | 151 ? ? ?|????----- 曾經(jīng)的最大連接數(shù)
| Ssl_client_connects ? ? ?| 0 ? ? ? ?|
| Ssl_connect_renegotiates | 0 ? ? ? ?|
| Ssl_finished_connects ? ?| 0 ? ? ? ?|
| Threads_connected ? ? ? ?| 10 ? ? ? |????---- 當(dāng)前的連接客戶端
+--------------------------+----------+
2.show variables????查看系統(tǒng)參數(shù),系統(tǒng)默認(rèn)設(shè)置或者dba調(diào)整優(yōu)化后的參數(shù),靜態(tài)的。可以通過set或者修改my.cnf配置文件修改。
MariaDB [(none)]> show variables like '%conn%';
+--------------------------+-----------------+
| Variable_name ? ? ? ? ? ?| Value ? ? ? ? ? |
+--------------------------+-----------------+
| character_set_connection | utf8 ? ? ? ? ? ?|
| collation_connection ? ? | utf8_general_ci |
| connect_timeout ? ? ? ? ?| 10 ? ? ? ? ? ? ?|????---連接數(shù)超時(shí)時(shí)間
| extra_max_connections ? ?| 1 ? ? ? ? ? ? ? |????---額外的最大連接數(shù)
| init_connect ? ? ? ? ? ? | ? ? ? ? ? ? ? ? |
| max_connect_errors ? ? ? | 10 ? ? ? ? ? ? ?|????---允許客戶端最大的錯(cuò)誤連接數(shù)
| max_connections ? ? ? ? ?| 1500 ? ? ? ? ? ?|????---最大連接數(shù)
| max_user_connections ? ? | 0 ? ? ? ? ? ? ? |
+--------------------------+-----------------+
?max_connect_errors = 10????表示客戶端連接數(shù)mysql時(shí),如果錯(cuò)誤連接數(shù)(輸入密碼錯(cuò)誤)10次,之后mysql會(huì)自動(dòng)鎖死,防止該客戶端再次連接。防止窮舉的網(wǎng)絡(luò)連接***。
轉(zhuǎn)載于:https://blog.51cto.com/jschu/1693776
總結(jié)
以上是生活随笔為你收集整理的show status和show variables区别解析的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 堆栈verilog设计实现及仿真
- 下一篇: Tomcat - Maven plugi