Adjust the connection parameters through the mysql server program mysql Administrator.
Adjust max_connections max_updates max_questions three data to a large number, then your limited operation will not lead to the termination of the database service
in the MySQL database, if a connection is not requested for 8 hours and The operation will be automatically disconnected, resulting in some database connection-based applications, especially WEB applications. There are three ways to solve this problem:
1: modify MySQL configuration parameters
2: modify JDBC
3: modify the third-party database connection pool application Proxool.xml
method One: The name of this parameter is wait_timeout, and its default value is 28800 seconds (8 hours). The meaning is the number of seconds to wait for action on this connection before closing a connection, that is, if a connection is idle more than the number of seconds set by this option, MySQL will actively disconnect the connection.
Modify operation:
Open /etc/my.cnf under linux, add the parameters below the attribute group mysqld as follows:
[mysqld]
interactive_timeout=28800000
wait_timeout=28800000
Open my.ini under windows, add:
interactive_timeout=28800000
wait_timeout=28800000
It has been shown that there is no way to set this value to infinity, that is, permanent. So if you can't guarantee that your application must have at least one operation in the set number of seconds, then it's best to use a second method to solve the problem.
Method 2: Modify the URL of the following JDBC connection:
jdbc:mysql://hostaddress:3306/schemaname?autoReconnect=true
Add autoReconnect=true this parameter, which 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
< BR>20
3
20
3
true
true
SELECT CURRENT_USER
Three, Start Menu-Run-services.msc
Find mysql service and double-click
Click Recovery tab< Br>
First failure: The default is "do not operate", changed to "restart service".
Adding a "0" to "Restart Service: ___ minutes" below means that if the service is terminated unexpectedly, it will restart immediately.
Click OK to make the settings take effect.
At this point you end the mysql-nt process in the task manager, you will find that the end can not be lost.
There is an advertiser who needs to use our server, and we are not obligated to audit their code, so
Something used by users in the network may exist on multiple shared computers. When using the user,
Controls how system resources are restored by reclaiming Application Pools settings. The following
can not upload large files Request object error ASP 0104: 80004005 or after successfully uploaded, t
Server IIS prohibits exe, zip, rar and other file downloads
Settings for pan-domain name resolution on Windows systems
Simple Linux Internet Cafe Movie Server
Centos system installation and configuration FastDFS steps to share
Service Unavailable solution after uninstalling ZkeysPHP
How to change the performance of the web application server?
Windows 2003 Campus Web Server Frequently Asked Questions
Teach you three tricks, and the electrical fire in the computer room said no!
How to solve the problem of Win8 system boot black screen only cursor
Win10 volume can not be adjusted solution
Win10 first free upgrade XP users still can't upgrade
How to add or remove some files in Win10 start menu bar?
Win8 upgrade Win8.1 preview version is not lost data /application
Win10 preview version 10061 system theme color change tutorial
How to use win screen function to quickly solve system problems in win7
Win7 flagship system comes with a powerful summary of the notebook
Win10 system command prompt box transparent display setting method