当前位置:Gxlcms > 数据库问题 > SpringBoot-错误-Access denied for user ''@'localhost' (using password: NO)

SpringBoot-错误-Access denied for user ''@'localhost' (using password: NO)

时间:2021-07-01 10:21:17 帮助过:104人阅读

-class-name=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false spring.datasource.data-username=root spring.datasource.data-password=123456

正确配置:

#数据库配置
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/springboot?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
spring.datasource.username=root
spring.datasource.password=123456

关键:用户名与密码并没有“data-”,如果有将报错

SpringBoot-错误-Access denied for user ''@'localhost' (using password: NO)

标签:local   span   mys   denied   bsp   res   没有   div   strong   

人气教程排行