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
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