The default ldquo of the MySQL server; wait_timeoutrdquo; is 8 hours (that is, the default value is 28800 seconds), that is, a connection is idle for more than 8 hours
The default ldquo of the MySQL server; wait_timeoutrdquo; is 8 hours (that is, the default value is 28800 seconds), that is, a connection is idle for more than 8 hours
The default "wait_timeout" of the MySQL server is 8 hours (that is, the default value is 28800 seconds). That is to say, if a connection is idle for more than 8 hours, MySQL will automatically disconnect the connection, in general, a connection is automatically disconnected if it is not active within 8 hours.
The following link will prompt an error: com. MySQL. jdbc. exceptions. MySQLNonTransientConnectionException: Connection. close () has already been called. Invalid operation in this state.
Check the MySQL5 manual and find that the maximum value of wait_timeout is 24 days/365 days (windows/linux ). Take windows as an example. If we want to set it to 21 days, we only need to modify the configuration file "my. ini "(MySQL5 installation dir), add a row in [MySQLd]: wait_timeout = 1814400
You need to restart MySQL 5.