This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes URL confused?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "URL confused??" Watch "URL confused??" New topic
Author

URL confused??

Costa Lamona
Greenhorn

Joined: Sep 17, 2006
Posts: 29
Hi

I am not sure what is URL string when you create a connection
DriverManager.getConnection(url, userName, password);

Is it a way to determine the host server that host the JDBC driver, so that I can connect to a remote jdbc??

if yes, so verify the following

When you write jdbc:mysql://77.60.90.10, this will create a connection to jdbc on that machine 77.60.90.10, and mysql is listening to some port which does not change.

Thanks
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Is it a way to determine the host server that host the JDBC driver, so that I can connect to a remote jdbc?

The server does not host the JDBC driver. The connecting client needs that.


When you write jdbc:mysql://77.60.90.10, this will create a connection to jdbc on that machine 77.60.90.10, and mysql is listening to some port which does not change.

Yes.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
Don't get me started about those stupid light bulbs.
 
subject: URL confused??
 
Similar Threads
JDBC Tye 2 Driver
Doubt on JDBC class.forname..
SQLServerException - could not connect to the host on port 1433
specify http proxy host, http proxy port for an URL connection
excepttion in thread "main" java.sql.SQLException: Io exception: The Network Adapter