permaculture playing cards*
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
Greenhorn

Joined: Jan 18, 2013
Posts: 24

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
Greenhorn

Joined: Jan 18, 2013
Posts: 24

Hey that was my mistake, I wrote



Actually it should be -



only ":" was missing after mysql.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp
 
Similar Threads
connection problem
JDBC + Localhost
JDBC, mysql connector/j, face a problem to connect mysql 5.1 and JSE.
JDBC Error
connecting to sql file