- Download JDBC driver JAR files for MySQL, SQL Server, Oracle, PostgreSQL, SQLite, Derby, Microsoft Access. Maven dependency is also included.
- DB2 JDBC Driver Versions and Downloads. The db2jcc.jar driver is now. Download the driver you need by visiting the DB2 Fix Packs by Version page.
Active4 years, 7 months ago
This question already has an answer here:
Create and Export MySQL JDBC driver. In the file system extract the MySQL driver JAR from the downloaded MySQL ZIP file to the downloads folder: In your Eclipse.
- How to install JDBC driver in Eclipse web project without facing java.lang.ClassNotFoundexception 13 answers
- I have downloaded the mysql-connector-java-5.1.24-bin.jar
- I have created a
lib
folder in my project and put the jar in there. - properties of project->build path->add JAR and selected the JAR above.
- I still get
java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/mysql
I am using mysql 5.5The code:
If I add
Class.forName('com.mysql.jdbc.Driver');
before Connection connection = DriverManager.getConnection(mySqlUrl, userInfo);
I get java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
Itay Moav -Malimovka
Itay Moav -MalimovkaItay Moav -MalimovkaJdbc Driver For Mysql Download
29.2k5656 gold badges168168 silver badges251251 bronze badges
marked as duplicate by BalusC javaOct 9 '15 at 7:58
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
7 Answers
Try to insert this:
before getting the JDBC Connection.
niculareniculare
1: I have downloaded the mysql-connector-java-5.1.24-bin.jar
Okay.
2: I have created a lib folder in my project and put the jar in there.
Wrong. You need to drop JAR in
/WEB-INF/lib
folder. You don't need to create any additional folders.3: properties of project->build path->add JAR and selected the JAR above.
Unnecessary. Undo it all to avoid possible conflicts.
4: I still get java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/mysql
This exception can have 2 causes:
- JDBC driver is not in runtime classpath. This is to be solved by doing 2) the right way.
- JDBC URL is not recognized by any of the loaded JDBC drivers. Indeed, the JDBC URL is wrong, there should as per the MySQL JDBC driver documentation be another colon between the scheme and the host.
887k312312 gold badges32573257 silver badges32933293 bronze badges
You can paste the .jar file of the driver in the Java setup instead of adding it to each project that you create. Paste it in C:Program FilesJavajre7libext or wherever you have installed java.
After this you will find that the .jar driver is enlisted in the library folder of your created project(JRE system library) in the IDE. No need to add it repetitively.
Vaibhav JoshiVaibhav Joshi
- copy mysql-connector-java-5.1.24-bin.jar
- Paste it into Apache Software FoundationTomcat 6.0lib<--here-->
- Restart Your Server from Eclipes.
- Done
DipanjanDipanjan
Mysql Jdbc Url
you haven't loaded driver into memory. use this following in
init()
Compaq presario v3000 drivers windows xp download. Also, you missed a colon (:) in url, use this
AnkitAnkit4,97644 gold badges3939 silver badges6565 bronze badges
if you are getting this exception again and again then download my-sql connector and paste in tomcat/WEB-INF/lib folder..note that some times WEB-INF folder does not contains lib folder, at that time manually create lib folder and paste mysql connector in that folder.definitely this will work.if still you got problem then check that your jdk must match your system. i.e if your system is 64 bit then jdk must be 64 bit
amol a. suryawanshiamol a. suryawanshi
Try this tutorial it has the explanation and it will be helpfulhttp://www.ccs.neu.edu/home/kathleen/classes/cs3200/JDBCtutorial.pdf
Prem ChandranPrem Chandran
Not the answer you're looking for? Browse other questions tagged javamysqlservletsjdbcdriver or ask your own question.
Active3 years, 6 months ago
I have the jar file:
mysql-connector-java-5.1.14-bin.jar
and I want to add it to my project.I add the jar at this way: project-> properties -> (Java Build Path) Libraries and add it from external jars. But when I try to use it and write:import com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
![Mysql Mysql](/uploads/1/3/3/4/133401570/248385890.jpg)
I get error under 'com.mysql'.
What is my mistake?
user1994587
user1994587user1994587
1 Answer
If the JAR file for the JDBC driver appears in the 'Referenced Libraries' branch of the project, like this: Free download windows 7 drivers.
then you don't need an
Gord ThompsonGord Thompsonimport
statement for it. Just use DriverManager.getConnection()
and Java should be able to find the JDBC driver itself.82.8k1515 gold badges110110 silver badges246246 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.