This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes JForum and the fly likes java.sql.SQLException: Access denied Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "java.sql.SQLException: Access denied" Watch "java.sql.SQLException: Access denied" New topic

java.sql.SQLException: Access denied

Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi~ When i try to install JForum i got a problem with access denied

my failure log is like this


com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Server connection failure during transaction. Due to underlying exception: 'java.sql.SQLException: Access denied for user 'root'@'myip' (using password: YES)'.


MESSAGE: Access denied for user 'root'@'myip' (using password: YES)


java.sql.SQLException: Access denied for user 'root'@'myip' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.secureAuth411(
at com.mysql.jdbc.MysqlIO.doHandshake(
at com.mysql.jdbc.Connection.createNewIO(
at com.mysql.jdbc.Connection.<init>(
at com.mysql.jdbc.NonRegisteringDriver.connect(
at java.sql.DriverManager.getConnection(
at java.sql.DriverManager.getConnection(
at net.jforum.SimpleConnection.getConnection(
at net.jforum.SimpleConnection.init(
at net.jforum.view.install.InstallAction.configureDatabase(
at net.jforum.view.install.InstallAction.doInstall(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at net.jforum.Command.process(
at net.jforum.view.install.InstallAction.process(
at net.jforum.InstallServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at net.jforum.util.legacy.clickstream.ClickstreamFilter.doFilter(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(



i put correct id and password but i can not install so i surveyed in this site whick symptoms like those of mine ;jsessionid=1ptd39komdw58.jetty1

and that solution was

correct file (/WEB-INF/config/database/mysql)

but, i can not find what wrong with my file

my file is like this


[root@localhost mysql]# vi
#Thu May 07 15:05:23 KST 2009


how must i correct this file??

please answer me

thank you~

[originally posted on by honghoekim]
Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
"Access denied" means that you connected to the MySQL server so it's not a bad host name or firewall blocking issue. It knows your user id and I assume that the password is correct.

There are a couple of things that come to mind based on this. First, the root id may be limited to only be allowed access with a "localhost" server name. FWIW, best practice is not to use root for applications but to create a separate application specific id with rights only to the application DB.

Second, you might need to adjust your MySQL JDBC drivers. Older versions of MySQL used unencrypted passwords. These can fail with the newer JDBC drivers which encrypt them. Also, if your MySQL server is new and the driver is old, this can happen too.

[originally posted on by monroe]
Migrated From
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I solved my problem!!

It was because of my host name.

I replaced it with 'ip address' to 'localhost'

anyway thank you~
[originally posted on by honghoekim]
It is sorta covered in the JavaRanch Style Guide.
subject: java.sql.SQLException: Access denied