MySQL difference between wait_timeout and connect_timeout
Right from the MySQL Documentation
- wait_timeout : The number of seconds the server waits for activity on a noninteractive connection before closing it.
- connect_timeout : The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake
EXAMPLES
- If wait_timeout is 1800 (30 Minutes), the DB Connection will close in 30 minutes if the connection is idle (indicated by
Sleep
in the command column of the processlist). - If connect_timeout is 10, then mysqld will reject you if you cannot login (authenticate) in 10 seconds.