java.sql.SQLException: Access denied for user 'root '@'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 Stack Overflow by Ganesh
, 1 year ago
Access denied for user 'root '@'localhost' (using password: YES)
via opengts by zeedoshinra
, 1 year ago
Access denied for user 'root'@'localhost' (using password : NO)
via opengts by brunosvc
, 1 year ago
Access denied for user 'admin'@'localhost' (using passwor d: YES)
via opengts by miguelocepeda
, 1 year ago
Access denied for user 'gts'@'localhost' (using password: NO)
via hibernate.org by Unknown author, 2 years ago
Access denied for user 'javauser'@'localhost' (using password: YES)
via opengts by cesarman
, 1 year ago
Access denied for user 'root'@'localhost' (using password: YES)
java.sql.SQLException: Access denied for user 'root '@'localhost' (using password: YES)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2847)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:750)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3558)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1151)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1768)
at com.mysql.jdbc.Connection.(Connection.java:430)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:268)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.admin.util.DbUtil.getConnection(DbUtil.java:28)
at com.admin.dao.CMSAdminDao.(CMSAdminDao.java:22)
at com.admin.controller.ManageCMSAdminController.(ManageCMSAdminController.java:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:119)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1102)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:828)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
12 more bugmates

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