Re: UNABLE TO CONNECT TO A DATABASE IN A WEB SERVER.

Поиск
Список
Период
Сортировка
От Andreas Schmitz
Тема Re: UNABLE TO CONNECT TO A DATABASE IN A WEB SERVER.
Дата
Msg-id 4BFE19A0.5090102@longimanus.net
обсуждение исходный текст
Ответ на UNABLE TO CONNECT TO A DATABASE IN A WEB SERVER.  (JORGE MALDONADO <jorgemal1960@gmail.com>)
Список pgsql-novice
the entry should like

host    all         all         192.168.1.77/32          password

or

host    all         all         192.168.1.0/24          password


do not forget to reload the server (pg_ctl reload) when making changes
to pg_hba.conf


try connecting to the DB manually from the webserver

psql -h <hostname> <dbname> -U <username>


if you still have problems change the setting password to trust and try
again to make sure the problem is related to the network and not to the
auth mechanism.

regards

andreas




JORGE MALDONADO wrote:
> I am writing a web app which should connect to a database in a server
> within my personal network but I am having trouble. I get the
> following error message:
>
> There is no record on pg_hba.conf for 192.168.1.77, user postgres,
> database restaurant, SSL inactive.
>
> I have checked the configuration files on the server machine as follows:
> * The listen_addresses parameter in postgresql.conf equals *.
> * The pg_hba.conf has an entry of type=host, database=all, user=all,
> IP-Address=192.168.1.77/32 <http://192.168.1.77/32>, Password=md5.
>
> I have tried changing the IP-Address to 192.168.1.0/24
> <http://192.168.1.0/24> and 192.168.0.0/16 <http://192.168.0.0/16>;
> also I tried Password=Trust and Password=Password.
>
> What else can I check?
>
> Respectfully,
> Jorge Maldonado


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

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: UNABLE TO CONNECT TO A DATABASE IN A WEB SERVER.
Следующее
От: "Machiel Richards"
Дата:
Сообщение: Setting up postgresql-8.3 on Debian