aspose file tools*
The moose likes JDBC and the fly likes MySQL error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "MySQL error" Watch "MySQL error" New topic
Author

MySQL error

Paul Cullen
Greenhorn

Joined: Sep 07, 2007
Posts: 11
java.sql.SQLException: Access denied for user ''@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3421)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1247)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2748)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.sun.rowset.JdbcRowSetImpl.connect(Unknown Source)
at com.sun.rowset.JdbcRowSetImpl.prepare(Unknown Source)
at com.sun.rowset.JdbcRowSetImpl.execute(Unknown Source)
at assignmentFASv1e.JdbcRowSetTest(assignmentFASv1e.java:280)
at assignmentFASv1e.<init>(assignmentFASv1e.java:166)
at assignmentFASv1e.main(assignmentFASv1e.java:323)
Tarun Yadav
Ranch Hand

Joined: Sep 20, 2007
Posts: 134
I Google'd the exception and it seems it's because of insufficient privileges to the user you're trying to connect with or a problem with your connection string.

Maybe this will help: http://forum.java.sun.com/thread.jspa?threadID=451229&messageID=2050178
[ September 21, 2007: Message edited by: Tarun Yadav ]
sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

Originally posted by Paul Cullen:
java.sql.SQLException: Access denied for user ''@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3421)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1247)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2748)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.sun.rowset.JdbcRowSetImpl.connect(Unknown Source)
at com.sun.rowset.JdbcRowSetImpl.prepare(Unknown Source)
at com.sun.rowset.JdbcRowSetImpl.execute(Unknown Source)
at assignmentFASv1e.JdbcRowSetTest(assignmentFASv1e.java:280)
at assignmentFASv1e.<init>(assignmentFASv1e.java:166)
at assignmentFASv1e.main(assignmentFASv1e.java:323)



You have specified wrong password when connection to database.


[Servlet tutorial] [Servlet 3.0 Cook Book]
 
 
subject: MySQL error
 
Similar Threads
mysql query
client cant connect to mysql
Visibility help?
Error in Hibernate url for mysql ?
java.net.SocketException: Broken pipe