数据库连接失败

来源:8-3 DBHelper类设计

我们的世界卢丽君

2016-03-23 22:12

java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:868)

at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3340)

at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1238)

at com.mysql.jdbc.Connection.createNewIO(Connection.java:2743)

at com.mysql.jdbc.Connection.<init>(Connection.java:1553)

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)

at java.sql.DriverManager.getConnection(DriverManager.java:579)

at java.sql.DriverManager.getConnection(DriverManager.java:221)

at util.DBHelper.getConnection(DBHelper.java:34)

at util.DBHelper.main(DBHelper.java:43)


写回答 关注

1回答

  • 月落乌啼_1
    2016-03-24 20:46:13

    密码错误吧

JAVA遇见HTML——JSP篇

Java Web入门级教程JSP,带你轻松的学习JSP基础知识

248277 学习 · 3071 问题

查看课程

相似问题