File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes using database at remote location 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 "using database at remote location" Watch "using database at remote location" New topic

using database at remote location

him jain
Ranch Hand

Joined: Feb 05, 2010
Posts: 56
I want to store the data in database, but db is on different computer.
So, is it possible to save data in that db from my computer?

--Himanshu Jain
Ravishanker kumar
Ranch Hand

Joined: Jul 20, 2006
Posts: 53
yes its possible. Provide machine name and database name for other machine.
For example if you are using mysql database, jdbc connection url is :jdbc:mysql://[Machine Name]/[Database Name]

Hope this will help you.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Yes, JDBC is in most cases used to access DBs that are *not* on the local machine, but somewhere on a server. As long as that server is reachable via TCP/IP (meaning, there's no firewall in between that blocks the DB port) it should work fine.
him jain
Ranch Hand

Joined: Feb 05, 2010
Posts: 56
thanks for help..
I agree. Here's the link:
subject: using database at remote location
It's not a secret anymore!