坑的没脾气Access denied for user ''@'localhost' (using password: NO)
Posted HK_HUST
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了坑的没脾气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)的主要内容,如果未能解决你的问题,请参考以下文章
连接mysql时提示java.sql.SQLException: Access denied for user 'root'@'DESKTOP-N2B2D9A' (us
安装mysql因为/tmp权限不足而导致ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)的解
spring小白必踩坑的小bugAccess denied for user ‘é??è?????‘@‘localhost‘ (using password: YES)