修改/etc目录下的my.cnf
[mysqld]
wait_timeout=86400
参见:https://blog.csdn.net/shiqidide/article/details/7642531