• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

connection to MySQL....

 
Friend
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
 
DC Dalton
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear
search & download the "org.gjt.." driver at google, that yr best bet.
good luck
malhar
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic