Re: Problems between Mandrake and pg

Поиск
Список
Период
Сортировка
От Ian Barwick
Тема Re: Problems between Mandrake and pg
Дата
Msg-id 200111242306.AAA00575@post.webmailer.de
обсуждение исходный текст
Ответ на Problems between Mandrake and pg  (Ryan Rohde Hansen <rrha00@control.auc.dk>)
Список pgsql-admin
Hi

On Wednesday 21 November 2001 14:44, Ryan Rohde Hansen wrote:

> We are a group studying at Aalborg University. We are at the moment
> developing a postgresql-db (7.1.3) on Mandrake 8.0, which we intend to
> access via libpq. But at the moment we can't even connect to the db.
> The connection is refused and we are asked if the -i option has been set
> in the startup of postmaster:
>
>     [01gr551@ika dbkode]$ ./test1
>     Connection to host=localhost dbname=01gr551 failed, PQconnectPoll()
> -- connect()
>      failed: Connection refused
>             Is the postmaster running (with -i) at 'localhost'
>             and accepting connections on TCP/IP port '5432'?
>
> The program we are running:
>
>     #include <stdlib.h>
>     #include <stdio.h>
>     #include </usr/local/pgsql/include/libpq-fe.h>
>
>     int main()
>     {
>
>        PGconn *conn;
>        const char *connection_str = "host=localhost dbname=01gr551";

Try leaving out the "host=localhost" part of the above string.
If the backend process isn't accepting connections on a TCP/IP port,
specifying a host name (even if it's the name of the local machine)
forces a connect to the port, which causes the above error.

See also:
http://www.postgresql.org/idocs/index.php?postmaster-start.html#CLIENT-CONNECTION-PROBLEMS

HTH

Ian Barwick

В списке pgsql-admin по дате отправления:

Предыдущее
От: "Yuri A. Kabaenkov"
Дата:
Сообщение: postgresql 7.1.3 on freebsd 4.4
Следующее
От: Andre Schubert
Дата:
Сообщение: Re: [Fwd: [Zope-dev] Authentication Problem with Postgres]