WinSQL » Knowledge base

Document information

Document ID:763
Subject:Why do I lose connection to MySQL after some time?
Creation date:7/29/09 2:42 PM
Last modified on:7/29/09 2:42 PM


By default, MySQL server terminates a client connection after 28800 seconds of inactivity. Often database administrators change this value to a lower number. This results in a broken connection if the user does not submit any query for a long period of time.

Type the following query to see what the current setting is for this variable.

SHOW VARIABLES like 'interactive_timeout'

In addition to 'interactive_timeout', you might also want to check the value for 'wait_timeout. Refer to MySQL documentation for a detailed description of these parameters.

To set a new value for these parameters, you can use the SET command. For example:

SET interactive_timeout=32000

IMPORTANT: There is no configuration setting in WinSQL (the client) that automatically terminates a connection. Therefore, the only way to fix this problem is to change the configuration parameter on the server.

Add a comment to this document

Do you have a helpful tip related to this document that you'd like to share with other users? Please add it below. Your name and tip will appear at the end of the document text.
Your name:
Your email:
Hide my email address
Verification code:
Enter the verification code you see above more submitting your tip
Tip:Please limit tips to 1000 characters


Social Media

Powered by