有沒有辦法從PHP直接獲取MySQL等待超時?從PHP獲取MySQL等待超時
0
A
回答
7
只是做一個正常的mysql查詢。
mysql> show variables where Variable_name='wait_timeout';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| wait_timeout | 28800 |
+---------------+-------+
1 row in set (0.07 sec)
在PHP中,它看起來像這樣。
// it's been a while to there might be typos
$res = mysql_query("show variables where Variable_name='wait_timeout'");
$arr = mysql_fetch_assoc($res);
echo $arr['Variable_name'];
echo $arr['Value'];
相關問題
- 1. 鎖等待超時超標在MySQL
- 2. c3p0客戶端超時,等待從com.mchange.v2.resourcepool.BasicResourcePool獲取資源
- 3. Mysql鎖定等待超時錯誤
- 4. Php會話鎖定等待超時
- 5. 獲取等待時間
- 6. 等待操作超時Win32Exception(0x80004005):等待操作超時azure
- 7. 設備從ntpd獲取時間,但「ntpq -p」命令正在等待超時
- 8. 等待操作超時
- 9. 超時30秒後,等待
- 10. QTime或QTimer等待超時
- 11. 等待操作超時
- 12. Websocket等待超時消息
- 13. 等待MongoConnection的超時
- 14. RabbitMQ等待超時消息
- 15. System.ComponentModel.Win32Exception:等待操作超時
- 16. innodb鎖定等待超時
- 17. MySQL錯誤1205:超出鎖定等待超時
- 18. READ COMMITTED超出鎖等待超時
- 19. magento超出鎖定等待超時sales_flat_order_grid
- 20. C++ select()不等待超時時間
- 21. 從MySQL/php獲取數據時出錯
- 22. 等待文件被創建超時
- 23. 多線程:阻塞等待超時
- 24. 套接字等待連接超時
- 25. httpclient異常「org.apache.http.conn.ConnectionPoolTimeoutException:超時等待連接」
- 26. ec2等待實例想出超時[Python]
- 27. NAudio Universal:超時等待事件
- 28. Linq的等待操作超時異常
- 29. 超時等待模塊無效
- 30. uWSGI「超時等待頭」錯誤
問題不明確 – ariefbayu 2011-04-21 07:36:26
您的意思是! – Gowri 2011-04-21 07:36:45
他想知道你是否可以從數據庫中找到它的超時時間(如PHP中的最大執行時間)是否來自PHP。 @ user718480你可能需要對數據庫使用某種查詢。 – ohmusama 2011-04-21 07:39:51