aspose file tools*
The moose likes JDBC and the fly likes How to connect MySQL  database  in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to connect MySQL  database  in Java" Watch "How to connect MySQL  database  in Java" New topic
Author

How to connect MySQL database in Java

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1056

How to connect MySQL database in Java


How to create DSN also for MySQL in Windows XP(Control Panel>>Administrative Tools>>DataSources(ODBC))


http://www.lifesbizzare.blogspot.com || OCJP:81%
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19783
    
  20

mysql java tutorial
mysql dsn
Both searches give good results at the top of the page.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1056

Hi Rob,

I got this , just one concern there is no need to go to control Panel Datasources and set a DSN Name right?
Deepak Rao
Ranch Hand

Joined: Jan 24, 2012
Posts: 31

Vishal,

Not really required. Depends on how you want to access it.
If you want to use sun's jdbcodbcDriver then you need to set the DSN.
You can also connect without setting DSN using com.mysql.jdbc.Driver .

Thanks
Deepak
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to connect MySQL database in Java