1.1 错误一
ERROR 1045 (28000): Access denied
for user 'usera'@'localhost' (using password:YES)
1.2 错误二
ERROR 1045 (28000): Access denied
for user 'usera'@'localhost' (using password:NO).
2. 错误一 常见错误是密码错误
重置密码即可
3. 错误二 输入账号密码时没有输入密码.
3.1 命令行中没有-p进行无密码登录
3.2 如果是IDE中的yaml文件确定password的缩进正确
cat application.yaml
spring:
datasource:
driver-class-name: org.mariadb.jdbc.Driver
url: jdbc:mariadb://localhost:3306/admin
username: admin
password: 123456
上面的password缩进错误, 就会提示(using password:No)
正确的是
spring:
datasource:
driver-class-name: org.mariadb.jdbc.Driver
url: jdbc:mariadb://localhost:3306/admin
username: admin
password: 123456