Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok. - Mailing list pgsql-general

From Andre Lopes
Subject Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.
Date
Msg-id CAGFRAbOtNncvPZ=kK+0mj_rwdJUtmbCk98HF0f3erBT_eaxZQg@mail.gmail.com
Whole thread Raw
Responses Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.
Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.
Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.
List 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 by date:

Previous
From: Jeff Amiel
Date:
Subject: Re: Oddball data distribution giving me planner headaches
Next
From: "David Johnston"
Date:
Subject: Re: Can't access to database from webapp in PostgreSQL 9.0, from shell it is Ok.