aspose file tools
The moose likes JDBC and the fly likes Mysql/JDBC Access Denied Error  Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Mysql/JDBC Access Denied Error  " Watch "Mysql/JDBC Access Denied Error  " New topic
Author

Mysql/JDBC Access Denied Error

jonas okwara
Ranch Hand

Joined: Jun 22, 2004
Posts: 58
Please I will appreciate any help with this error. I am trying to connect to a Mysql 5.0 database with Java using mysql connector/j3.1. I have been trying to fix it without success. Below is the error I am getting.




java.sql.SQLException: Access denied for user 'mysql'@'localhost' (using password: YES)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:771)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3649)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1176)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2558)
at com.mysql.jdbc.Connection.<init>(Connection.java:1485)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java
:266)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at LoadDriver.main(LoadDriver.java:31)
[ May 15, 2006: Message edited by: jonas okwara ]
Masoud Kalali
Author
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

Hi
First thing that i can tell is about your username and password.
double check the user name and pasword you used to create the connection ,
either using connection url or setting them seprately.

also check that server is running on the port you used to connect to it.


Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
stu derby
Ranch Hand

Joined: Dec 15, 2005
Posts: 333
http://dev.mysql.com/doc/refman/5.0/en/access-denied.html
http://dev.mysql.com/doc/refman/5.0/en/connection-access.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mysql/JDBC Access Denied Error
 
Similar Threads
Error in Hibernate url for mysql ?
JSP: Unable to connect to mysql in local drive [Solved]
"main" java.sql.SQLException: Access denied for user 'root'@'192.168.1.1' (using password: YES)
mysql query
Exception while connecting to database