aspose file tools*
The moose likes Servlets and the fly likes connection to MySQL.... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "connection to MySQL...." Watch "connection to MySQL...." New topic
Author

connection to MySQL....

Friend
Ranch Hand

Joined: Nov 23, 2000
Posts: 67
Hi,
I wrote a servlet program. In that I am using MySQL as database. Then which driver I should use?
OR how I configure the mysql database to use in a java program?
Pls give the information about this.
Thank you.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

http://www.mysql.com/downloads/api-jdbc.html
DC Dalton
Ranch Hand

Joined: May 28, 2001
Posts: 287
There are several drivers available for mySql, the most common being "org.gjt.mm.mysql.Driver" the connection string is then jdbc:mysql://localhost/databaseName?user=dbUserName&password=dbPassword"); If you do a search for the driver Im sure you will find it as I dont remember exactly where to get it..........hope that helps
Amit Lonkar
Greenhorn

Joined: Dec 12, 2001
Posts: 25
Hi
you can use the follwoing driver:-
"org.gjt.mm.mysql.Driver".
Also you will have to make sure that the mysql.user and mysql.db database tables has entries for the database that you have created, and also the give proper privilages in these tables for your database.
Originally posted by jyotsna varma:
Hi,
I wrote a servlet program. In that I am using MySQL as database. Then which driver I should use?
OR how I configure the mysql database to use in a java program?
Pls give the information about this.
Thank you.

Malhar Barai
Author
Ranch Hand

Joined: Aug 17, 2001
Posts: 399
dear
search & download the "org.gjt.." driver at google, that yr best bet.
good luck
malhar


Malhar Barai
SOA & Java Book
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connection to MySQL....