At 18:44 -0800 3/26/02, Foo Yong Choon wrote:
>My application cannot connect to the database and
>perform SQL qurey after usuualy after a day.
>I heard that mysql automatically close connection
>after 8 hrs of inactivity.
>Hope u can email me how to prevent the auto closing or
>any alternative method. Thanks in advance!
Reconfigure the timeout period for the server, if you
have control of the server. You can do this by putting
a line in the [mysqld] group of the system-wide option
file (e.g., /etc/my.cnf):
set-variable = wait_timeout=n
Where n is the timeout value.
Or just send a do-nothing statement to the server every once in
a while. Something like "SET @dummy = 1", perhaps.