This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
The moose likes JDBC and Relational Databases and the fly likes Java/MySQL connectivity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Java/MySQL connectivity" Watch "Java/MySQL connectivity" New topic

Java/MySQL connectivity

Patrick Mugabe
Ranch Hand

Joined: Jan 08, 2002
Posts: 132
Hi Ranchers,

I have been using JDBC mostly with Access and SQL Server.
I now want to switch to Mysql.
Can anyone assist me with the Driver loading statement (Class.forname....)
when using Mysql.
If possible just give a simple example.

Thanks in advance
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

No one can without knowing which driver you are using. I suggest you check the documentation that comes with which ever driver you have - they usually include example connection code.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Sutham Rojanusorn

Joined: Jul 10, 2004
Posts: 4
something about this you can find it from google
this is the simple way to do without posting to here
I agree. Here's the link:
subject: Java/MySQL connectivity