Mysql solves the problem of automatic disconnection of connections that have not been used for nearly eight hours, I have done some experiments on this issue. The results of the study on mysql automatic disconnection at www.2cto.com are as follows. There are related parameter settings in mysql. When the database connection is idle for a certain period of time, the server will disconnect the connection waiting for Timeout: At the same time, only one of these two parameters works. Which parameter takes effect depends on the connection parameter specified during user connection. wait_timeout is used by default. I suggest modifying both parameters to avoid unnecessary troubles. 2. Modify the parameters. The default value is 8 hours. I tested changing these two parameters to 0, and the result is unexpected. The system automatically sets this value to 1. In other words, you cannot set this value to permanent. We recommend that you add three zeros to the parameter value to meet our application requirements. Modify www.2cto.com: Open/etc/my. cnf: Add the following parameters to the attribute group mysqld: [mysqld] interactive_timeout = 28800000wait_timeout = 28800000 windows in my. added in ini: interactive_timeout = 28800000wait_timeout = 28800000