Re: [INTERFACES] Failure to connect remotely to postgresql with JDBC - Mailing list pgsql-interfaces

From Peter T Mount
Subject Re: [INTERFACES] Failure to connect remotely to postgresql with JDBC
Date
Msg-id Pine.LNX.3.96.980729171717.966D-100000@maidast.retep.org.uk
Whole thread Raw
In response to Failure to connect remotely to postgresql with JDBC  (Kelvin SIN <ksin@students.cs.mu.OZ.AU>)
Responses Postgresql JDBC driver compliance
List pgsql-interfaces
On Thu, 30 Jul 1998, Kelvin SIN wrote:

> Hi,
>
> I am using Postgresql 6.3.2 running on a Sun Solaris. The interface I am
> using is JDBC.
>
> When I connect, I received the following error messages:

[snip]

> The url is:
>
> jdbc:postgresql://holly.cs.mu.oz.au:5432/conlayer?user=me&password=abc&
> auth=password

First, the auth=password is no longer used. Since 6.3, the network
protocol changed, and the client and server now negociate the
authentication scheme to use (based on pb_hba.conf).

Also, remember that postgresql users are not the same as unix users.
Unless you have used pg_password to create a password file, then use the
"ALTER USER" sql statement to set a password in the database.

> conlayer is the database name.
>
> That is, the server is holly.cs.mu.oz.au and the port is 5432. postmaster
> is definitely running on holly. The environment variables PGHOST has been
> set to holly.cs.mu.oz.au and PGPORT has been set to 5432. PGLIB and
> PGDATA has also been set correctly. The pg_hba.conf has been set to accept
> all users from anywhere but this doesn't helps. Can someone please help?

Is the client holly aswell?

Do you have the pg_hba.conf file configured to allow the client's IP
address access? Even if they are the same machine, if you specify the host
name, rather name localhost, then you'll need to add the server's IP
address into the file aswell as 127.0.0.1

--
Peter T Mount peter@retep.org.uk or petermount@earthling.net
Main Homepage: http://www.retep.org.uk
PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres


pgsql-interfaces by date:

Previous
From: Sandeep
Date:
Subject: Problem in compilation
Next
From: Nathan DeBardeleben
Date:
Subject: Storing Java Objects Through JDBC