PDA

View Full Version : Remote Database Access With Jdbc


Griffin
05-27-2004, 12:27 PM
Hi,

Could anyone tell me if accessing the mysql databases remotely is allowed? In other words, can I only use localhost as the host? Or can I use my domain name?

Basically, I am trying to write a Java application that uses the jdbc drivers to talk to MySQL. I want to be able to hit my databases from this application. I am trying this, but it isn't working:

myCon = DriverManager.getConnection("jdbc:mysql://www.swstory.com/swstory_main","swstory","password");

So, www.swstory.com is the host, swstory_main is the db, swstory is the username, and then of course the password.

Am I doing this wrong or is only localhost allowed?

Thanks,

-Griffin

dbmasters
05-27-2004, 02:29 PM
nope, localhost only.

Griffin
05-27-2004, 02:35 PM
Okay, no problem. Thanks for the reply.

eugene
05-28-2004, 08:49 PM
Griffin-
First of all, create an account and login so that you can receive email notification of replies to your posts. Secondly, although the servers are set up to restrict access to localhost, you may be able to use a workaround.
Let me know if you would like some help . . . it would also be useful to know where you intend to just do SQL SELECTS or you need more than simple READ-ONLY access to the databases.
-Eugene

eugene
05-28-2004, 09:39 PM
Correction/Addendum:
You can access your data directly from a desktop or another machine; you need not be on localhost.

-Eugene

krAnk
06-02-2004, 09:27 PM
Hi,

eugene, I'd be interested in your workaround. I did like it better when I could manage my db via Windows clients. I was not aware of the introduction of this restriction, is it due to security issues?

krank