java.sql.SQLException: Access denied for user ‘20646‘@‘localhost‘

java.sql.SQLException: Access denied for user ‘20646‘@‘localhost‘ ,第1张

使用yml配置文件的时候出现这个错误

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    data-username: root
    data-password: 333
    url: jdbc:mysql://localhost:3306/cloud_flight?useSSL=false&serverTimezone=UTC

改成这样

spring:
  datasource:
    driver-class-name: com.mysql.cj.jdbc.Driver
    username: root
    password: 333
    url: jdbc:mysql://localhost:3306/cloud_flight?useSSL=false&serverTimezone=UTC

就解决了

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/869342.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-13
下一篇 2022-05-13

发表评论

登录后才能评论

评论列表(0条)

保存