In Linux, mysql modifies connection timeout 1. First, enter mysql to check whether the value wait_timeout and interactive_timeout is the default 8 hours (that is, 28800) [root @ server110 ~] # Mysql-u root-p Enter password: Enter the password and run the following command: show variables like '% timeout % '; + bytes + ------- + | Variable_name | Value | + bytes + ------- + | connect_timeout | 10 | delayed_insert_timeout | 300 | innodb_lock_wait_timeout | 50 | bytes | OFF | interactive_timeout | 28800 | | net_read_timeout | 30 | net_write_timeout | 60 | slave_net_timeout | 3600 | table_lock_wait_timeout | 50 | wait_timeout | 28800 | + timeout + ------- + as shown in the following table, the connection timeout value is changed by default by 8 hours. in mysql 5 or later versions, you need to modify my. the cnf file is located in/etc/my. the following two sentences are added after [mysqld] for cnf: wait_timeout = 388000 interactive_timeout = 388000 3. restart mysql service mysqld restart. The following information is displayed to stop MySQL: [OK] Start MySQL: [OK] Now you can use the 1 method, view the values of these two parameters + bytes + -------- + | Variable_name | Value | + bytes + -------- + | connect_timeout | 10 | delayed_insert_timeout | 300 | innodb_lock_wait_timeout | 50 | bytes | OFF | interactive_timeout | 388000 | net_read_timeout | 30 | net_write_timeout | 60 | slave_net_timeout | 3600 | table_lock_wait_timeout | 50 | wait_timeout | 388000 | + bytes + -------- + OK, modified