Problem : You are getting java.lang.ClassNotFoundException: com.mysql.jdbc.Driver error while connecting to MySQL database from Java Program. You may be running your Java application directly from command prompt, shell script, ANT or Eclipse.
Cause : In order to connect to MySQL database, you need JDBC driver for MySQL. A class which implements java.sql.Driver interface for MySQL. Every vendor is responsible to implement this class for their databases. This driver implementation is provided by MySQL as MySQL java connector library. There is a class called com.mysql.jdbc.Driver which implements this interface.
Read more »
Cause : In order to connect to MySQL database, you need JDBC driver for MySQL. A class which implements java.sql.Driver interface for MySQL. Every vendor is responsible to implement this class for their databases. This driver implementation is provided by MySQL as MySQL java connector library. There is a class called com.mysql.jdbc.Driver which implements this interface.
No comments:
Post a Comment