【发布时间】:2017-08-17 19:42:29
【问题描述】:
我正在尝试使用 Spring Data JPA(在 Spring Boot 应用程序中)连接到 MySQL 数据库,但总是出现相同的错误:
java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO)
我的application.properties 看起来像:
spring.datasource.url=jdbc:mysql://localhost:3306/demographics
spring.datasource.data-username=root
spring.datasource.data-password=root
spring.jpa.hibernate.ddl-auto=update
我知道url、username 和password 都不错。
【问题讨论】:
标签: mysql spring-boot spring-data-jpa