The last packet sent successfully to the server was 0 milliseconds ago.问题解决

The abnormal "The last packet sent successfully to the server was 0 milliseconds ago." is mostly due to the database reclaiming the connection, and the system's buffer pool does not know it and continues to use the reclaimed connection.

  1. **The first solution: ** is to increase the time for mysql to recycle idle connections. The default time for mysql to recycle is 8 hours. You can add the following configuration to my.ini in the mysql directory to change the time to 1 day.

      单位是秒,最大好像是24天:
    
     [mysqld]
    
     wait_timeout=86400
    

Still can't solve the problem, and then I thought of using Navicat to connect to try, and I got an error
2003-can't connect to mysql server on'******'(10061)

  1. **The second solution: ** is to use the administrator to run cmd, switch to the bin of your locally installed mysql directory, and restart mysql

     net start mysql
    

If the above method still cannot be solved, you can check other blogs to modify the configuration file. I use the second method successfully.

Guess you like

Origin blog.csdn.net/Mou_O/article/details/104552945