Re: postgres- connection refuse - Mailing list pgsql-jdbc

From Paul Thomas
Subject Re: postgres- connection refuse
Date
Msg-id 20030909124743.C2393@bacon
Whole thread Raw
In response to postgres- connection refuse  ("Yang Soon Chiao" <yangsc@tntsb.com>)
List pgsql-jdbc
On 09/09/2003 12:08 Yang Soon Chiao wrote:
> This is my first time using postgres. Everything work fine when I use
> psql at the bin, however when I try to connect using java, I get this
> message.
>
> Connection refused. Check that the hostname and port are correct and that
> the postmaster is accepting TCP/IP connections.
>
> - It seem like I have the problem with hostname and port but I don't know
> how to tune it. (I've modify my postgresql.conf set tcpip_socket = true
> but still cannot work).

Did you restart the postmaster?

>
> - Here is how my code looks like
> conn = DriverManager.getConnection("jdbc:postgresql:mydb","", "");
>
> (I'm not connecting to any web server)
>
> Please help and thanks in advance.
>

I'm sure if an empty userid will work (I've never tried it). What does
your pg_hba.conf say? Aslo what version of postgreSQL are you using?

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

pgsql-jdbc by date:

Previous
From: "Yang Soon Chiao"
Date:
Subject: postgres- connection refuse
Next
From: "Nick Fankhauser"
Date:
Subject: Re: postgres- connection refuse