MySQL session time-out setting

Source: Internet
Author: User

Interactive_timeout: The number of seconds that the server waits for activity before closing an interactive connection. The interactive client is defined as a client that uses the Client_interactive option in Mysql_real_connect (). See Wait_timeout again.
Wait_timeout: The number of seconds that the server waits for activity before closing a non-interactive connection. When a thread starts, the session Wait_timeout value is initialized based on the global Wait_timeout value or global interactive_timeout value, depending on the client type (the connection option for the Mysql_real_connect () Client_ Interactive definition), see also Interactive_timeout
So it seems that two variables are in common control, so they must be modified. Continue to drill down into these two variables Wait_timeout range is 1-2147483 (Windows), 1-31536000 (Linux), interactive_time values with wait_timeout changes, Their default values are 28800.
The MySQL system variable is controlled by the configuration file, and when not configured in the configuration file, the system uses the default value, which is the default value of 28800. To be modified, it can only be modified in the configuration file. Under Windows under%mysql home%/bin there is a Mysql.ini configuration file, open after adding two variables in the following location, assign values. (modified here to 388000)

MySQL session time-out setting

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.