Enable my. ini in windows and add: interactive_timeout28800000wait_timeout28800000 expert answer: MySQL is a small relational database management system. MySQL is automatically disabled due to mysql volume.
Open my. ini in windows and add:
Interactive_timeout = 28800000
Wait_timeout = 28800000
Expert answer: MySQL is a small relational database management system. due to its small size, fast speed, and low total cost of ownership, especially open source code, many small and medium websites choose MySQL as their website database to reduce their total cost of ownership.
You can adjust the connection parameters through mysql Administrator, the mysql server program. Adjust max_connections max_updates max_questions to a large number. Therefore, your limited operations will not lead to the termination of the database service in the MySQL database, if a connection is not requested or operated for 8 hours, it will be automatically disconnected, resulting in some database-based connection applications, especially WEB applications, errors. There are three ways to automatically disable services for mysql databases:
Method 1: this parameter is named wait_timeout. its default value is 28800 seconds (8 hours ). It indicates the number of seconds that a connection will wait for to take action before closing a connection. that is to say, if a connection is idle more than the number of seconds set by this option, MySQL will take the initiative to disconnect the connection.
Modification operation:
In linux, open/etc/my. cnf and add the following parameters under the attribute group mysqld:
Interactive_timeout = 28800000
Wait_timeout = 28800000
Open my. ini in windows and add:
Interactive_timeout = 28800000
Wait_timeout = 28800000
Some practices have shown that there is no way to set this value to an infinitely large value, that is, permanent. Therefore, if you cannot guarantee that your application must have at least one operation in the specified number of seconds, you 'd better solve the problem using the second method.
Method 2: modify the URL of the following JDBC connection:
Jdbc: mysql: // hostaddress: 3306/schemaname? AutoReconnect = true
The parameter autoReconnect = true can solve this problem.
Method 3: configuration file (proxool. xml ):
Mysql
Jdbc: mysql: // localhost/yourDatebase? UseUnicode = true & characterEncoding = UTF-8
Com. mysql. jdbc. Driver
90000
20
3
20
3
True
True
SELECT CURRENT_USER
Experts suggest that you use the first method to solve the problem of automatically disabling mysql services.