show global variables like ‘%timeout‘;
show global variables like ‘max_allowed_packet‘;
//以下三个参数调大
set global interactive_timeout=10800;
set global wait_timeout=10800;
set global max_allowed_packet=536870912;
Mysql server has gone away解决办法
原文:https://www.cnblogs.com/tanfd/p/14538353.html