我的项目连接mysql 的时候,总是报这个错误 :
The last packet successfully received from the server was 21,350 milliseconds ago. The last packet sent successfully to the server was 21,323 milliseconds ago.
大神们 怎么解决啊
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
先尝试下不要通过java程序,直接通过mysql命令连接,确定问题是出现在数据库还是在java连接程序这边。
检查下有没有使用连接池,可能是这个连接在连接池中还存活,但是mysql数据库实际已经收回了,可以通过设置wait_timeout来处理。