MySQL Timeout: The Last Packet Successfully Received From the Server Was

MySQL connection timeout error as follows:

The last packet successfully received from the server was 

Use the following command to query the timeout duration (in seconds, default is 8 hours):

show global variables like 'wait_timeout';

In my.ini, add the following under the mysqld section:

wait_timeout=31536000
interactive_timeout=31536000

This example uses one year; you can adjust it according to your needs. If you have many concurrent connections, you can reduce the time appropriately; if you have fewer connections, you can increase it accordingly.

Query again:

show global variables like 'wait_timeout';


Leave a Comment

Your email address will not be published.