aspose file tools*
The moose likes JDBC and the fly likes  java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark " java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp" Watch " java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp" New topic
Author

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

Ranjeet Deshmukh
Ranch Hand

Joined: Jan 18, 2013
Posts: 35

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)




[Thumbnail for Capture.PNG]


~R@njeet.
Ranjeet Deshmukh
Ranch Hand

Joined: Jan 18, 2013
Posts: 35

Hey that was my mistake, I wrote



Actually it should be -



only ":" was missing after mysql.
 
wood burning stoves
 
subject: java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp