定义数据链接报错

image.png

报错:

当前驱动加载路径:E:\FineReport_11.0\webapps\webroot\WEB-INF\lib\mysql-connector-java-5.1.49-bin.jar

检测驱动

当前驱动加载路径下驱动未冲突

当前驱动加载路径:E:\FineReport_11.0\webapps\webroot\WEB-INF\lib\mysql-connector-java-5.1.49-bin.jar

检测驱动

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

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.jdbc.Util.handleNewInstance(Util.java:403)

at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)

at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:335)

at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2187)

at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2220)

at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2015)

at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:768)

at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)

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.jdbc.Util.handleNewInstance(Util.java:403)

at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:385)

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:323)

at com.fr.third.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1666)

at com.fr.third.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1732)

at com.fr.third.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2907)

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.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)

at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:299)

... 15 more

FineReport Wjayon 发布于 2024-9-12 18:11 (编辑于 2024-9-12 18:13)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共2回答
最佳回答
0
华莉星宸Lv7资深互助
发布于2024-9-12 18:15

检查下路径下是不是有多个mysql 驱动

------------------------------------

[平台]MySQL数据连接 https://help.fanruan.com/finereport/doc-view-2560.html

MySQL数据连接常见问题 https://help.fanruan.com/finereport/doc-view-1988.html

最佳回答
0
ChazzenLv2初级互助
发布于2024-9-12 18:41

下载个新的MYSQL驱动,在驱动管理上传,定义数据连接时选择 自定义的驱动,这样试试呢

  • 3关注人数
  • 118浏览人数
  • 最后回答于:2024-9-12 18:41
    请选择关闭问题的原因
    确定 取消
    返回顶部