Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mysql/JDBC Access Denied Error

 
jonas okwara
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 531
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic