【坑的没脾气】Access denied for user ''@'localhost' (using password: NO)

出了问题,先根据提示仔细检查,再去百度。【敲黑板:因为很有可能因为粗心碰到的问题百度到的只是类似的,而不一样,那样排查起来更费时!!】

这次问题就在于,不要轻易相信IDEA的自动填充!!!

----------------正确--------------
spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/tensquare_article?characterEncoding=utf-8
    username: root
    password: 123456

---------------错误-------------------
spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    url: jdbc:mysql://localhost:3306/tensquare_article?characterEncoding=utf-8
    username: root
    data-password: 123456   #自动填充的是 data-password  然后就using password: NO

【坑的没脾气】Access denied for user ''@'localhost' (using password: NO)

上一篇:mongodb创建用户和密码


下一篇:CentOS7.0环境下,通过tar包安装MySQL8.0