Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp

 
Ranjeet Deshmukh
Ranch Hand
Posts: 35
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I was trying to do JDBC using following code,



Then I got following exception,

Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at test.JDBCDemo.main(JDBCDemo.java:21)

Capture.PNG
[Thumbnail for Capture.PNG]
External jar that I have added in Eclipse 4.2(Juno)
 
Ranjeet Deshmukh
Ranch Hand
Posts: 35
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey that was my mistake, I wrote



Actually it should be -



only ":" was missing after mysql.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic