Thread: PSQL error connection

PSQL error connection

From
ee97010@fe.up.pt
Date:
Hello.
I wonder if you could help me? When i tried to make a connection to my database
Postgres by TCP/IP the following ocurred:

Warning: Unable to connect to PostgreSQL server: connectDBStart() -- connect()
failed: Connection refused Is the postmaster running (with -i) at 'dionisio'
and accepting connections on TCP/IP port 5432?

My PHP script is:
$conn = pg_connect("host=remote_host
                    dbname=myDB
                    user=username
                    password=pass");

Thanks for your atention and looking forward to hear from you soon,



               Carla Pereira

Re: PSQL error connection

From
"Chad R. Larson"
Date:
At 07:00 AM 3/26/2002 , ee97010@fe.up.pt wrote:
>Warning: Unable to connect to PostgreSQL server: connectDBStart() --
>connect()
>failed: Connection refused Is the postmaster running (with -i) at 'dionisio'
>and accepting connections on TCP/IP port 5432?

So =is= your postmaster running with a '-i'?

Try "pg_ctl status" to find out.


         -crl
--
Chad R. Larson (CRL22)    chad@eldocomp.com
   Eldorado Computing, Inc.   602-604-3100
      5353 North 16th Street, Suite 400
        Phoenix, Arizona  85016-3228


Re: PSQL error connection

From
Peter Eisentraut
Date:
ee97010@fe.up.pt writes:

> Hello.
> I wonder if you could help me? When i tried to make a connection to my database
> Postgres by TCP/IP the following ocurred:
>
> Warning: Unable to connect to PostgreSQL server: connectDBStart() -- connect()
> failed: Connection refused Is the postmaster running (with -i) at 'dionisio'
> and accepting connections on TCP/IP port 5432?

Actually reading the error message and answering the question contained
therein might be a good start.

--
Peter Eisentraut   peter_e@gmx.net