show global variables like 'wait_timeout';
28800秒 === 8 小时
vi /etc/my.cnf
加入这句
wait_timeout=1814400
重启
在看看
join_buffer_size = 128M
sort_buffer_size = 22M
# read_rnd_buffer_size = 2M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
lower_case_table_names = 1
max_allowed_packet = 500M
wait_timeout=1814400
参考: