问答详情
源自:8-3 DBHelper类设计

数据库连接失败

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)


提问者:我们的世界卢丽君 2016-03-23 22:12

个回答

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

    密码错误吧