Answers for "no suitable driver found for jdbc:mysql"

3

java.sql.sqlexception: no suitable driver found

This error occurs if JDBC is not able to find a suitable driver for
the URL format passed to the getConnection()
method e.g."jdbc:mysql://" in our case.

In order to solve this error,
you need the MySQL JDBC driver like
"mysql-connector-java-5.1.36.jar" in your classpath.
Posted by: Guest on July-27-2021
0

no suitable driver found for jdbc:mysql

Connection con = null;
try {
    //registering the jdbc driver here, your string to use 
    //here depends on what driver you are using.
    Class.forName("something.jdbc.driver.YourFubarDriver");   
    con = DriverManager.getConnection("jdbc:apache:commons:dbcp:test");
} catch (SQLException e) {
    throw new RuntimeException(e);
}
Posted by: Guest on June-06-2021

Code answers related to "no suitable driver found for jdbc:mysql"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language