Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to connect to mysql database?

 
Kavitha Sen
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Ranchers,

I have eclipse ide,tomcat server and mysql database, oracle ide.
I have included ojdbc14.jar in classpath.

Now i like to know how to connect database in eclipse. I mean what code should be included? and where to include? can any one help me.

sorry for asking the basic doubt.
 
Kavitha Sen
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello again,

I copied the following code for database connection.


But i get this error.

Darn! A SQL error: Io exception: The Network Adapter could not establish the connection

What should I do? please help me. Thanks.
 
aswin kumar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi !
configure a jdbc Driver in eclipse, for this windows->showView->DBBrowser->rtClick->someConfiurations like drivername and Login Details and add jar files for Driver

and then make sure Database is in running mode,after that you can execute your program.

regards,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic