SpringBoot结合mybatis时连接数据库是遇到了一个很坑的bug。java.sql.SQLException: Access denied for user ‘Asher’@‘localhost’ (using password: YES)
bug长这样:
java.sql.SQLException: Access denied for user 'Asher'@'localhost' (using password: YES)
解决:
就是你写的数据库字段名和配置数据库的.properties或.yml文件里的名字一样了。
在数据库配置文件把name 改成username 就OK了!