mysql lost connection to server during query

时间:2021-08-04 12:24:12
vim /etc/mysql/mysql.conf.d/mysqld.cnf

[mysqld]
#3600000/1000=3600秒=1小时
wait_timeout =3600000
#2G缓冲
max_allowed_packet =2048M service mysql restart

以上为ubuntu设置方法,mysql5.7.20-0ubuntu0.17.04.1