Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while using DriverManager to connect to MySQL DB.

 
Robinson Francis
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20606
60
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And please KeepItDown, also in subject lines.
 
Robinson Francis
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, all for your answer. I have managed to solve it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic