java.sql.SQLException

Access denied for user 'nunit '@'localhost' (using password: YES)

Samebug tips1

MySQL doesn't support some types of characters (such as emojis) with the utf8 encoding. You need to be on MySQL 5.5+ and force utf8mb4 (everywhere, client and server). You can do this sending the query "SET NAMES utf8mb4". Check this https://goo.gl/3E2qzg

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web5785

  • Access denied for user 'nunit '@'localhost' (using password: YES)
  • Access denied for user 'user'@'localhost' (using password: YES)
  • via atomikos.com by Unknown author, 1 year ago
    Access denied for user 'root@localhost'@'localhost' (using password: YES)
  • Stack trace

    • java.sql.SQLException: Access denied for user 'nunit '@'localhost' (using password: YES) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4323)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1267)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2255)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2286)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2085)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)[mysql-connector-java-5.1.38.jar:5.1.38] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[na:1.8.0_102] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[na:1.8.0_102] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[na:1.8.0_102] at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[na:1.8.0_102] at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)[mysql-connector-java-5.1.38.jar:5.1.38] at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)[mysql-connector-java-5.1.38.jar:5.1.38]

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    4 times, 18 hours ago
    3 times, 1 day ago
    Once, 1 month ago
    Once, 1 month ago
    Once, 1 month ago
    150 more bugmates