MySql-Access denied for user ''@'localhost' (using password: NO)

问题描述:

SpringBoot-Alibaba + JPA + MySql

Access denied for user ''@'localhost' (using password: NO)

spring:
  application:
    name: service-order
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/shop?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8&autoReconnect=true
    username: root
    password: root

 

参考:

Access denied for user ''@'localhost' (using password: NO)之idea坑~

 

解决方案:

IDEA自动补充的锅,数据库的用户名以及密码配置的参数名有问题,应该是:

 

上一篇:Mac下Mysql遇到ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using


下一篇:error: open /var/root/.ssh/id_rsa: permission denied