关于springboot连接数据库是报错

连接mysql错误java.sql.SQLException: Access denied for user ''@'localhost' (using password: YES)

首先url加入?characterEncoding=utf8

datasource:
driver-class-name: org.gjt.mm.mysql.Driver
url: jdbc:mysql://localhost:3306/dbgirl
user: root
password: root
*可以通过的配置
spring:
profiles:
active: dev
datasource:
url: jdbc:mysql://localhost:3306/demoidea?characterEncoding=utf8
username: root
password: root
jpa:
hibernate:
ddl-auto: create-drop
show-sql: true


欢迎大神指点

posted @ 2017-03-21 10:50  今年我十八岁  阅读(1609)  评论(0编辑  收藏  举报