mysql数据库连接失败

使用设计器连接数据库正常

使用服务器部署版连接数据库就报错,我sql里面已经被fr写了很多数据库进去。

但是系统就是提示连接失败

QQ截图20201230101136.png



com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. at sun.reflect.GeneratedConstructorAccessor197.newInstance(Unknown Source) 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:404) at com.mysql.jdbc.Util.getInstance(Util.java:387) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:917) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860) at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2163) at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2088) at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806) at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) at sun.reflect.GeneratedConstructorAccessor193.newInstance(Unknown Source) 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:404) at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:410) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:328) at com.fr.third.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1461) at com.fr.third.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1525) at com.fr.third.alibaba.druid.pool.DruidDataSource$CreateConnectionThread.run(DruidDataSource.java:2165) Caused by: java.sql.SQLException: Access denied for user 'admin'@'WIN-FR' (using password: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:963) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:875) at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1712) at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1228) at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2253) at com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2104) ... 12 more


FineReport 1005770242 发布于 2020-12-30 10:12
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
zsh331Lv8专家互助
发布于2020-12-30 10:17(编辑于 2020-12-30 10:24)

楼主:配置信息一致的前提下,一般都是数据库【驱动版本】问题;拿设计器里面的驱动文件替换掉服务器部署版的对应驱动文件,重启服务,再连接;

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

image.png

  • 1005770242 1005770242(提问者) 请问一下如何提取驱动文件?
    2020-12-30 10:23 
  • zsh331 zsh331 回复 1005770242(提问者) /FineReport10/webapps/webroot/WEB-INF/lib目录里面
    2020-12-30 10:25 
  • 2关注人数
  • 419浏览人数
  • 最后回答于:2020-12-30 10:24
    请选择关闭问题的原因
    确定 取消
    返回顶部