Re: No pg_hba.conf entry ???

From: "Paulo Parola" <pgsql(at)brazilinfo(dot)com>
To: "pgsql-general" <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: No pg_hba.conf entry ???
Date: 2000-02-21 18:25:32
Message-ID: 007a01bf7c99$11f25d40$0100c0a8@venus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have altered my pg_hba.conf file to have also a line as below:

host all my.real.ip.address 255.255.255.255 trust

and now I can connect to the database.

The server in question is a 'shadow' server for which I still have no domain
name associated. After I finish migration my ISP will setup DNS information
for the new server to start responding for my actual domain name. Should
that be the cause of the problem?

Even for the server with no domain name associated with it, shouldn't the
line below be sufficient for connection to succeed???

host all 127.0.0.1 255.255.255.255 trust

TIA,
Paulo

----- Original Message -----
From: Paulo Parola <pgsql(at)brazilinfo(dot)com>
To: pgsql-general <pgsql-general(at)postgreSQL(dot)org>
Sent: Monday, February 21, 2000 2:01 PM
Subject: No pg_hba.conf entry ???

> Hi,
>
> My ISP is having many problems with PostgreSQL (version 6.3) running upon
> BSD/OS 3.1 i386 (PHP version 3.0.12) so that they made available to me a
new
> server running FreeBSD 3.3-RELEASE i386 (PHP version 3.0.12) and a new
> version of PostgreSQL (6.5.2). I have recreated the database and its
tables
> at the new server and have reinstalled the PHP3 pages which access this
> database but I keep receiving the following message while trying to access
> the PHP3 pages:
>
> Warning: Unable to connect to PostgresSQL server: No pg_hba.conf entry for
> host xxx.xxx.xxx.xxx, user my_user, database photos in
>
/usr/local/etc/httpd/htdocs/image_database/image_database_search_results_br.
> htm on line 12
> Bad connection to database!
> Sorry
> .
>
> The command to connect inside the script is the following:
>
> if ( !($pgconn = pg_connect("localhost", "5432", "", "", "photos")) )
> {
> echo "Bad connection to database!<p>Sorry<p>.\n";
> }
> else
>

> .....
> }
>
> My 'pg_hba.conf' is located inside directory 'data' below subdirectory
'pgsql' where PostgreSQL files are located, and contains at the moment only
the following lines (the same as in the old server):
>
> local all
trust
> host all 127.0.0.1 255.255.255.255 trust
>
> Why connection works for the old server and not for the new one???
>
> TIA,
> Paulo
>
>

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert Esser 2000-02-21 19:03:53 Problems using Postgres-ODBC-Borland BDE
Previous Message Jim Mercer 2000-02-21 18:13:36 Re: [GENERAL] Re: No pg_hba.conf entry ???