he last packet sent successfully to the server was 0 milliseconds ago. The driver has not received a
Posted qingmuchuanqi48
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了he last packet sent successfully to the server was 0 milliseconds ago. The driver has not received a相关的知识,希望对你有一定的参考价值。
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105) at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151) at com.mysql.cj.exceptions.ExceptionFactory.createCommunicationsException(ExceptionFactory.java:167) at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:91) at com.mysql.cj.NativeSession.connect(NativeSession.java:150) at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:947) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:817) ... 93 common frames omitted Caused by: java.net.ConnectException: Connection timed out: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at com.mysql.cj.protocol.StandardSocketFactory.connect(StandardSocketFactory.java:155) at com.mysql.cj.protocol.a.NativeSocketConnection.connect(NativeSocketConnection.java:65) ... 96 common frames omitted
没有成功的连接到数据库才会报出来这样的异常情况
修改一下yml中的连接数据库的配置信息,就可以解决这个异常情况
以上是关于he last packet sent successfully to the server was 0 milliseconds ago. The driver has not received a的主要内容,如果未能解决你的问题,请参考以下文章
Mysql: Communications link failure The last packet sent successfully to the server was....
The last packet sent successfully to the server was 0 milliseconds ago.
The last packet sent successfully to the server was 0 milliseconds ago.
Springboot项目启动:报错The last packet sent successfully to the server was 0 milliseconds ago
Cannot create PoolableConnectionFactory (Communications link failure The last packet sent successfu
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received