首页 > 数据库> > java项目出现的Java.sql.Excejava.sql.SQLException: Access denied for user ‘root‘@‘localhost‘...
java项目出现的Java.sql.Excejava.sql.SQLException: Access denied for user ‘root‘@‘localhost‘...
作者:互联网
java.sql.SQLException: Access denied for user ‘root’@‘localhost’ (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:998)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3847)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1207)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)等问题,
有可能是导入的sql文件的连接数据库的数据库名和密码的错误-----即修改代码中连接数据库的数据库名和密码
标签:...,jdbc,java,sql,MysqlIO,mysql,Java,com 来源: https://blog.csdn.net/qq_43367377/article/details/116563619