Hi guys!
I'm deploying a django project with postgresql as database backend. I
used to create a local user with the same name of the database user
(owner of the database), so I just need to run the webserver as the
local user and the database should work without problems (this was true
for webware). I try to run django as the local user and hit the page
without success, the error message tells me: FATAL: Ident
authentication failed for user "saraswati".
What can I do? Thanks
I typically use password-based authentication instead of same-user
ident authentication in postgresql. Look in pg_hba.conf on your
system.
My pg_hba.conf typically looks like this:
local all postgres
ident sameuser
local all all password
host all all 127.0.0.1 255.255.255.255 password
That allows password-based authentication for locally-initiated
connections - either over local unix sockets or tcp connections on the
loopback interface.
Then create a postgresql user and password in psql.
> without success, the error message tells me: FATAL: Ident
> authentication failed for user "saraswati".
edit pg_hba.conf - change authentication from ident 'sameuser' to
password
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
> Then create a postgresql user and password in psql.
that is
createuser saraswati -P
I'm not very familiar with pg_hba.conf file but with your help I will
:D
Thanks for help!
--
Michel Thadeu Sabchuk
Curitiba/PR
On 3 Jan, 02:54, Kenneth Gonsalves <law...@thenilgiris.com> wrote:
> On 02-Jan-07, at 11:18 PM, Michel Thadeu Sabchuk wrote:
>
> > without success, the error message tells me: FATAL:Ident
> > authentication failed for user "saraswati".edit pg_hba.conf - change authentication fromident'sameuser' to
> password
>
> --
>
> regards
> kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/
I have this same error when i run "python manage.py syncdb".
I tried changing "pg_hba.conf" but without success. I got around the
problem temporarily by running manage.py logged in as user "postgres",
but then I get:
"psycopg2.OperationalError: FATAL: database "sp" does not exist"
At this point, the Apache server isn't running, and it's not needed,
right? So what else can be the problem? I created the database "sp"
with the shell command "createdb" in postgresql and I can access it
through the psql-shell.
> I'm deploying a django project with postgresql as database backend. I
> used to create a local user with the same name of the database user
> (owner of the database), so I just need to run the webserver as the
> local user and the database should work without problems (this was true
> for webware). I try to run django as the local user and hit the page
> without success, the error message tells me: FATAL: Ident
> authentication failed for user "saraswati".
If u're running under Windows you should check out the hidden file at
C:\Documents and Settings\<USERNAME>\Application Data\postgresql
\pgpass.conf
which contains info in the format:
localhost:5432:*:YOUR_USER:YOUR_PASSWORD
Lorenzo
I had some problems getting PostgreSQL to work when I installed it, so
I tried several source codes and packages before it worked. That's
probably why I had two different versions.