alibaba / druid

阿里云计算平台DataWorks(https://help.aliyun.com/document_detail/137663.html) 团队出品,为监控而生的数据库连接池
https://github.com/alibaba/druid/wiki
Apache License 2.0
27.97k stars 8.58k forks source link

druid配置数据源报错Access denied for user 'root'@ 通过工具连接时正常的,springboot项目启动就报错 #5731

Closed lucien0801 closed 8 months ago

lucien0801 commented 9 months ago

19:41:34.673 [restartedMain] ERROR c.a.d.p.DruidDataSource - [init,942] - init datasource error, url: jdbc:mysql://127.0.0.1:3306/xx?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 java.sql.SQLException: Access denied for user 'root'@'xx.xx.xx.xx' (using password: YES) at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:130) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:825) at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:446) at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:239) at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:188) at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:118) at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:232) at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:112)

lizongbo commented 8 months ago

这种都是自己的配置问题,请核实配置。