From: Chris <dmagick@gmail.com>
To: Arun Oakley <arun.oakley@gmail.com>
Cc: pgsql-php@postgresql.org
Subject: Re: pg_connect() error
Date: Fri, 11 Sep 2009 08:51:14 +1000
Message-ID: <4AA982E2.1050807@gmail.com> (raw)
In-Reply-To: <e3dc1abc0909032119p39a9b15ci74163f28e9ef7cbf@mail.gmail.com>
References: <e3dc1abc0909032119p39a9b15ci74163f28e9ef7cbf@mail.gmail.com>
Arun Oakley wrote:
> hi guys,
>
> we have a postgres db with a hosting company and have been trying to
> connect to. error is below.
> *Warning*: pg_connect() [function.pg-connect
> <http://hoopsgm.net/test/function.pg-connect;]: Unable to connect to
> PostgreSQL server: could not connect to server: Connection refused Is
> the server running on host "pgdb1.host-ed.net
> <http://pgdb1.host-ed.net>"; and accepting TCP/IP connections on port 3306?
Port 3306 is usually mysql not postgres.
Postgres (by default) uses 5432.
> from my trawling around google i have found that it could be related to
> the postgres.conf file and turning on tcpip sockets to true?? (i cannot
> view/edit any postgres conf files)
> oh and those are the host/port details supplied by hosting provider
>
>
> any help would be appreciated in pointing on the right path.
Make sure they know you want a postgres db, not mysql.
Apart from that, if you can't view a postgres.conf file let alone change
it, you need to raise a support issue with them to fix it.
Do they allow remote connections to their database? Maybe they don't for
security reasons.
--
Postgresql & php tutorials
http://www.designmagick.com/
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: dmagick@gmail.com, arun.oakley@gmail.com
Subject: Re: pg_connect() error
In-Reply-To: <4AA982E2.1050807@gmail.com>
References: <e3dc1abc0909032119p39a9b15ci74163f28e9ef7cbf@mail.gmail.com> <4AA982E2.1050807@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox