The processing method will be described in detail below:
1. Use Mysql 4.0 or 4.1 version, if you do not use some new features of Mysql 5 such as stored procedure triggers.
2. Restart the Mysql server or Ser regularly (since this problem may also affect other server programs that require Mysql support, it is better to restart the Mysql server, but it is difficult to determine a time when the Mysql server is not being used.)
3 .Set my.cnf and add parameters in the mysqld field:
[mysqld]port = 3306socket = /tmp/mysql.sockwait_timeout= 500000interactive_timeout = 500000 (500000 seconds is a timeout of about five or six days. You can choose a database that may be idle according to actual needs. The maximum time value is slightly larger.) Just restart the Mysqld application, or add the -o wait_timeout=500000 parameter when executing mysqld to have the same effect.
When you show variable on the MySQL client, you should be able to see that the last one has changed from the default wait_time=28000 to 500000.
(If restarting Mysqld does not take effect, you can restart the machine)