aspose file tools*
The moose likes JDBC and the fly likes Error while using DriverManager to connect to MySQL DB. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Error while using DriverManager to connect to MySQL DB." Watch "Error while using DriverManager to connect to MySQL DB." New topic
Author

Error while using DriverManager to connect to MySQL DB.

Robinson Francis
Greenhorn

Joined: Aug 16, 2010
Posts: 22
Dear ALL,

I have encountered some problems while trying to write a simple programme to connect with a MySQL db.

Below is the main() method code which calls the class to connect to the db.




The error seems to have happened in this DAO IMPLementation code.





The console output and the stack trace are as below:




Please help me on this guys. If there is any more info that I must include please let me know. Thank you all for your effort.

Very truly yours,
ROBINSON
James Boswell
Bartender

Joined: Nov 09, 2011
Posts: 1030
    
    5

The exception indicates you have provided an incorrect username and password when connecting. Should you not be using 'root' instead of 'ROOT' as the username?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19720
    
  20

And please KeepItDown, also in subject lines.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Robinson Francis
Greenhorn

Joined: Aug 16, 2010
Posts: 22
Thank you, all for your answer. I have managed to solve it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while using DriverManager to connect to MySQL DB.