最近使用Spring Boot配置MySQL时出现错误:Access denied for user ''@'localhost' (using password: YES) 或 Access denied for user ''@'localhost' (using password: NO)。这通常是Spring Boot中yml配置文件的一个坑。
最近使用 springboot 配置 mysql 时出现了一个错误
Access denied for user ''@'localhost' (using password: YES) 或者
Access denied for user ''@'localhost' (using password: NO)
后来查看源码发现,对于 username 和 password 的参数有一句这样的说明:Login username of the database./ Login password of the database.
而 data-username 和 data-password 的说明又有不同:
Username of the database to execute DML scripts (if different). / Password of the database to execute DML scripts (if different).
执行DML脚本的数据库的用户名(如果有)。
最近使用Spring Boot配置MySQL时出现错误:Access denied for user ''@'localhost' (using password: YES) 或 Access denied for user ''@'localhost' (using password: NO)。这通常是Spring Boot中yml配置文件的一个坑。
最近使用 springboot 配置 mysql 时出现了一个错误
Access denied for user ''@'localhost' (using password: YES) 或者
Access denied for user ''@'localhost' (using password: NO)
后来查看源码发现,对于 username 和 password 的参数有一句这样的说明:Login username of the database./ Login password of the database.
而 data-username 和 data-password 的说明又有不同:
Username of the database to execute DML scripts (if different). / Password of the database to execute DML scripts (if different).
执行DML脚本的数据库的用户名(如果有)。