MySQL set connection time-out parameter: wait_timeout

Source: Internet
Author: User

[Email protected] ~]# mysql-h 192.168.0.*-uroot-p
Enter Password:
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 8174
Server version:5.1.73 Source Distribution

Copyright (c) and/or, Oracle, its affiliates. All rights reserved.

Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.

Type ' help ', ' or ' \h ' for help. Type ' \c ' to clear the current input statement.

Mysql> show global variables like ' wait_timeout ';
+---------------+-------+
| variable_name | Value |
+---------------+-------+
| Wait_timeout | 28800 |
+---------------+-------+
1 row in Set (0.00 sec)

mysql> set global wait_timeout=86400;
Query OK, 0 rows Affected (0.00 sec)

Mysql> show global variables like ' wait_timeout ';
+---------------+-------+
| variable_name | Value |
+---------------+-------+
| Wait_timeout | 86400 |
+---------------+-------+
1 row in Set (0.00 sec)

Mysql>

MySQL set connection time-out parameter: wait_timeout

Related Article

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.