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 ]
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.