 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Pawel Guest
|
Posted: Fri May 20, 2005 1:22 pm Post subject: localhost - connection problem |
|
|
Hi,
I have a problem with java and PostgreSQL. When I type:
connection =
DriverManager.getConnection("jdbc:postgresql://"+host+":"+postgresPort+"/thesis",
user, password);
as long as the host equals "localhost" everything is ok. But when I
type: "laptop" which is the real name of my machine (where in fact
PostgreSQL is installed) it throws an SQLException.
I have a line: listen_addresses = '*' in my postgresql.conf file.
If someone could explain me that problem I would be grateful.
Thanks for any help
Pawel
|
|
| Back to top |
|
 |
Thomas Kellerer Guest
|
Posted: Fri May 20, 2005 1:26 pm Post subject: Re: localhost - connection problem |
|
|
On 20.05.2005 15:22 Pawel wrote:
| Quote: | Hi,
I have a problem with java and PostgreSQL. When I type:
connection =
DriverManager.getConnection("jdbc:postgresql://"+host+":"+postgresPort+"/thesis",
user, password);
as long as the host equals "localhost" everything is ok. But when I
type: "laptop" which is the real name of my machine (where in fact
PostgreSQL is installed) it throws an SQLException.
I have a line: listen_addresses = '*' in my postgresql.conf file.
If someone could explain me that problem I would be grateful.
|
(This is really a PG question rather then a Java question.)
Which hosts are enabled in pg_hba.conf?
For details see:
http://www.postgresql.org/docs/8.0/static/client-authentication.html
Thomas
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|