Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.
Дата
Msg-id 201112021534.58125.adrian.klaver@gmail.com
обсуждение исходный текст
Ответ на Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.  (Andre Lopes <lopes80andre@gmail.com>)
Ответы Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.
Список pgsql-general
On Friday, December 02, 2011 3:13:41 pm Andre Lopes wrote:
> Hi,
>
> I've installed PostgreSQL 9.0 in CentOS6 I don't have configured
> anything in Postgre, I just created a user with this method:
>

>
> With the method above I have no problems in enter "psql" but when I
> try to connect with the user created with these method to a webapp I
> got an error:
>
> [code]
> Exception Value:
> FATAL:  Ident authentication failed for user "mypoatgreuser"
> [/code]
>
> There is more permissions that I must to give to the user
> "mypoatgreuser"? What could be wrong here?

Some pointers. The  client authentication is handled here:
http://www.postgresql.org/docs/9.0/interactive/auth-pg-hba-conf.html

In your pg_hba.conf  there is at least one authentication method set to ident.
That is described here:
http://www.postgresql.org/docs/9.0/interactive/auth-methods.html#AUTH-IDENT

From the sequence of commands you have given you are looking to use password
authentication.  For security you want md5.
There may already be a line with that method in your pg_hba.conf. In pg_hba.conf
first matching line wins, so if there is a line with ident first it will take
precedence.

If this is too confusing post your pg_hba.conf(unless of course there are
security issues) and we can go from there.


>
> Best Regards,

--
Adrian Klaver
adrian.klaver@gmail.com

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

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.