当前位置:Gxlcms > 数据库问题 > 【坑的没脾气】Access denied for user ''@'localhost' (using password: NO)

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

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

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

这次问题就在于,不要轻易相信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)

标签:dea   for   --   art   class   问题   access   lang   百度   

人气教程排行