List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 27 2002 2:55am
Subject:Re: MySQL Connecyion error
View as plain text  
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):

[mysqld]
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.

Thread
MySQL Connecyion errorFoo Yong Choon27 Mar
  • Re: MySQL Connecyion errorPaul DuBois27 Mar
  • Re: MySQL Connecyion errorDicky Wahyu Purnomo27 Mar
RE: MySQL Connecyion errorJoe Hoffman27 Mar
Re: MySQL Connecyion errorFoo Yong Choon27 Mar
  • Re: MySQL Connecyion errorPaul DuBois27 Mar
    • Re: MySQL Connection errorFoo Yong Choon27 Mar
      • Re: MySQL Connection errorMike Mangino27 Mar