java.sql.SQLException: Access denied for user ”@’localhost’ (using password: YES)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via journaldev.com by Unknown author, 1 year ago
Access denied for user ”@’localhost’ (using password: YES)
via Stack Overflow by B-Y
, 2 years ago
Access denied for user 'root'@'localhost' (using password: YES)
via github.com by Unknown author, 2 years ago
Access denied for user 'drupal_uat'@'trobertson.gbif.org' (using password: YES)
via Stack Overflow by CupOfTea
, 2 weeks ago
Access denied for user 'devmetl'@'<ip_address>' (using password: NO)
via Stack Overflow by Curbe
, 11 months ago
Access denied for user 'localhost'@'localhost' (using password: YES)
via Stack Overflow by Chars Davy
, 6 months ago
java.sql.SQLException: Access denied for user ”@’localhost’ (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:870)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1659)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1206)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2234)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2265)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2064)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:790)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
at com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:422)
at com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:134)
at com.ashu.dbcp.TestDataSource.testDataSource(TestDataSource.java:28)
at com.ashu.dbcp.TestDataSource.main(TestDataSource.java:71)

Users with the same issue

Once, 5 hours ago
5 times, 17 hours ago
Once, 4 days ago
4 times, 6 days ago
77 times, 1 week ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.