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

Поиск
Список
Период
Сортировка
От Andre Lopes
Тема Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.
Дата
Msg-id CAGFRAbOtNncvPZ=kK+0mj_rwdJUtmbCk98HF0f3erBT_eaxZQg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.  ("David Johnston" <polobo@yahoo.com>)
Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
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:

[article]
Here is how I do to create a Postgres user with the same username as
my regular login in Linux Ubuntu.

Go to your terminal with your regular user and do:

{{{
yourusername$ sudo su - postgres
}}}

Ok, now you are as postgres user. To access to postgres do:

{{{
postgres$ psql
}}}

Now that you are in postgres terminal, do this:

{{{
postgres=# create user yourusername with createdb createrole password
'newpassword';
}}}

an then do:

{{{
postgres=# create database yourusername with owner yourusername;
}}}

And now you can do this:

{{{
postgres=# \q
postgres$ exit
yourusername$ psql
...
yourusername=# ......
}}}

Remember that this will create a postgres user with the same username
as your regular login, a password, and the privileges to create more
databases and users.
[/article]

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?

Best Regards,

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

Предыдущее
От: Jeff Amiel
Дата:
Сообщение: Re: Oddball data distribution giving me planner headaches
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.