一:java.sql.SQLException: Access denied for user 'root'@'10.150.152.200' (using password: YES)
1:用户名后多了空格(username值root后多了空格)
spring:
datasource:
url: jdbc:mysql://10.150.152.200:3306/mybatis
username: root
password: root
driver-class-name: com.mysql.jdbc.Driver
2:没有授权
GRANT ALL PRIVILEGES ON . TO root @'%' IDENTIFIED BY "password";
FLUSH PRIVILEGES; //刷新权限
参考链接:https://www.cnblogs.com/maanshancss/p/9272358.html
转载来源:https://blog.csdn.net/jnx1142410525/article/details/55056197