Home  >  Article  >  Backend Development  >  Set Mysql execution timeout

Set Mysql execution timeout

WBOY
WBOYOriginal
2016-07-25 09:09:511832browse
The database connection may time out when PHP performs data query or other operations in crontab. Use the following code to set the MySQL execution timeout.

  1. $db->query("SET interactive_timeout = 3600;");
  2. $db->query("SET wait_timeout = 3600;");
  3. ?>
Copy Code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn