为了账号安全,请及时绑定邮箱和手机立即绑定

这个报错,数据库没连上?用户名密码还有URL都是对的

com.alibaba.druid.pool.DruidDataSource   : create connection error, url: jdbc:mysql://127.0.0.1:3306/dbgirl?characterEncoding=utf8&useSSL=true, errorCode 1045, state 28000


配置文件

spring.datasource.driver-class-name=com.mysql.jdbc.Driver

spring.datasource.url=jdbc:mysql://127.0.0.1:3306/dbgirl?characterEncoding=utf8&useSSL=true

spring.datasource.data-username=root

pring.datasource.data-password=root

spring.datasource.druid.initial-size=1

spring.datasource.druid.min-idle=1

spring.datasource.druid.max-active=20

spring.datasource.druid.test-on-borrow=true

spring.datasource.druid.stat-view-servlet.allow=true


正在回答

2 回答

有对应的数据库和启动mysql服务吗?

0 回复 有任何疑惑可以回复我~
#1

晴颜 提问者

数据库有的,在别的项目上都可以使用的
2018-08-14 回复 有任何疑惑可以回复我~

spring.datasource.data-username=root

pring.datasource.data-password=root

配置不对,应该是

spring.datasource.username=root

pring.datasource.password=root

小细节,折腾好久


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

这个报错,数据库没连上?用户名密码还有URL都是对的

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号