PDOStatement::execute(): MySQL server has gone away

原因:

mysql执行时间或执行缓存容量超过了默认值。


解决办法:应用时必须重启数据库~~

在mysql配置文件my.ini中添加或修改为以下配置:

wait_timeout=2880000
interactive_timeout=2880000
max_allowed_packet=100M

猜你喜欢

转载自blog.csdn.net/tangxinzhuan/article/details/72835038