• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

connection to MySQL....

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.mysql.com/downloads/api-jdbc.html
 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Author
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear
search & download the "org.gjt.." driver at google, that yr best bet.
good luck
malhar
 
reply
    Bookmark Topic Watch Topic
  • New Topic