• Post Reply Bookmark Topic Watch Topic
  • New Topic

Mysql-Jar file

 
kashwini Kulkarni
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,

Can anyone please suggest me a site from where can i download mysql.jar and also an example that will explain the connection with mysql.



Thanks in Advance
KAshwini
 
Sagar Rohankar
Ranch Hand
Posts: 2907
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're looking for Connector/J, a JDBC driver for MySQL.
http://dev.mysql.com/usingmysql/java/
 
Jijesh T Das
Greenhorn
Posts: 11
 
Jijesh T Das
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Class.forName("com.mysql.jdbc.Driver").newInstance();

con = DriverManager.getConnection("jdbc:mysql:///test", "username", "password");
 
Jan Cumps
Bartender
Posts: 2620
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jijesh T Das wrote:Class.forName("com.mysql.jdbc.Driver").newInstance(); ...

Why the call to newInstance() ?
I have seen this popping up in a few answers lately. Where is that coming from?

Check Oracle's jdbc intro,
and the MySQL jdbc intro, listing 4:

Class.forName("com.mysql.jdbc.Driver");
 
kashwini Kulkarni
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Thanks to all of you for helping me and guiding me.


Thanks in Advance
Kashwini
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!