35 Star 344 Fork 128

代码搬运工 / vctgo-platform

 / 详情

vctgo启动VctgoSystemApplication,报错:Access denied for user 'root'@'localhost' (using password: NO)

Backlog
Opened this issue  
2023-05-12 10:45

vctgo启动VctgoSystemApplication,报错:Access denied for user 'root'@'localhost' (using password: NO)
错误链:
2023-05-12 10:34:23.634 ERROR 4064 --- [ main] com.alibaba.druid.pool.DruidDataSource : init datasource error, url: jdbc:mysql://vctgo-mysql:3306/vctgo_platform?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:828)
at com.mysql.cj.jdbc.ConnectionImpl.(ConnectionImpl.java:448)
at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:241)
at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:198)
at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:118)
at com.alibaba.druid.filter.FilterAdapter.connection_connect(FilterAdapter.java:764)
at com.alibaba.druid.filter.FilterEventAdapter.connection_connect(FilterEventAdapter.java:33)
at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:112)
at com.alibaba.druid.filter.stat.StatFilter.connection_connect(StatFilter.java:232)
at com.alibaba.druid.filter.FilterChainImpl.connection_connect(FilterChainImpl.java:112)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1703)
at com.alibaba.druid.pool.DruidAbstractDataSource.createPhysicalConnection(DruidAbstractDataSource.java:1786)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:925)

是怎么回事?mysql数据库管理工具连接没问题,用户/密码:root/password

Comments (8)

康林 created任务

[ main] com.alibaba.druid.pool.DruidDataSource : init datasource error, url: jdbc:mysql://vctgo-mysql:3306/vctgo_platform?
这里的vctgo-mysql:3306的是要改本地的ect/host文件的域名映射,不想改的话,修改为127.0.0.1就好,没设置就无法解析地址了,这些都是比较基础的问题了,我看作者的开发文档里也有写的,比较详细,如果着急的话建议看看文档比较好。
修改为jdbc:mysql://127.0.0.1:3306/vctgo_platform

hosts映射已经写过了,这个问题是数据库连上了,好像root的密码没写,可我有root配置的地方都写密码了,不知到是哪里的密码没写,找不到啊

config_info这个表里的content字段有配置root的password,都没写password内容,我都加上password内容了,可VctgoSystemApplication还是启动不起来,还是报这个错误,不知哪里的问题

通过SQL批量修改nacos配置生效需要至少5小时才能真正的发布到服务
1.通过SQL批量变更,再到控制台进行逐个对变更的data_id进行手动发布;
2.另一种是调nacos的发布接口POST /nacos/v1/cs/configs

先把mysql密码去掉,看看能否连接上,建议打个断点到德鲁源码看看加载的密码

修改注册中心配置文件,vctgo_system_dev.yml 填写数据库密码;或者修改sql文件下的cvtgo_config.sql,58行 数据库密码,重新初始化数据库

参与悬赏未提交

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(4)
Avatar default 12902533 kangsame 1706755862
Java
1
https://gitee.com/vctgo/vctgo-platform.git
git@gitee.com:vctgo/vctgo-platform.git
vctgo
vctgo-platform
vctgo-platform

Search