mysql超时:The last packet successfully received from the server was

mysql超时,报错如下:

The last packet successfully received from the server was 

使用以下命令查询超时时间(单位为秒,默认为8小时):

show global variables like 'wait_timeout';

在my.ini中mysqld下面增加

wait_timeout=31536000
interactive_timeout=31536000

这里以1年为例,大家可以根据自己的需求设置。如果连接人数很多,时间可以适当的减少,连接人数少可以适当增加。

再次查询:

show global variables like 'wait_timeout';


发表评论

您的邮箱地址不会被公开。