0
我試圖微調MySQL在2G內存的Linux的Centos的VPS,我用mysqltuner.pl報告說:減少或消除持久連接mysql的
General recommendations:
Add skip-innodb to MySQL configuration to disable InnoDB
MySQL started within last 24 hours - recommendations may be inaccurate
Enable the slow query log to troubleshoot bad queries
**Reduce or eliminate persistent connections to reduce connection usage**
When making adjustments, make tmp_table_size/max_heap_table_size equal
Reduce your SELECT DISTINCT queries without LIMIT clauses
Variables to adjust:
max_connections (> 151)
wait_timeout (< 28800)
interactive_timeout (< 28800)
tmp_table_size (> 16M)
max_heap_table_size (> 16M)
我有一個關於一個問題:「減少或消除持久連接以減少連接使用「: 1.我如何知道當我的站點正在運行時使用PHP編寫時有多少個連接? 2.如何減少或消除它們?如果在my.cnf設置中有一個變量或者我必須在PHP端執行它?
請幫助,因爲我仍然在做試驗和錯誤,我正在學習,但仍然不是很瞭解mysql。謝謝。