java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)错误原因

时间:2021-07-06 19:20:08

java.sql.SQLException: Access denied for user ‘root’@’localhost’ (using password: YES)错误原因 解决方案:

1. 用户对应的密码不正确
检查输入的用户名 密码 与数据库用户名 密码 是否一致
2. localhost ???
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)错误原因
两表中 url 选择localhost 会报错 java.sql.SQLException: Access denied for user ‘root’@’localhost’ (using password: YES) 使用127.0.0.1 代码正常运行