postgres

K

Kurt M. Dresner

I'm trying to access a PostgreSQL database on my machine, however, I get
the following error:

irb(main):003:0> conn = PGconn.connect("localhost", 5432, "", "",
"music")
PGError: FATAL: IDENT authentication failed for user "kdresner"


from (irb):3:in `connect'
from (irb):3

I created the database, so I should have the rights to access it...

-Kurt
 
D

Dmitry Borodaenko

003:0> conn = PGconn.connect("localhost", 5432, "", "",
KMD> "music")
KMD> PGError: FATAL: IDENT authentication failed for user "kdresner"
<...>
KMD> I created the database, so I should have the rights to access it..

Not necessarily. What's in your pg_hba.conf and pg_ident.conf?

Also, don't forget that connecting directly ('local' in pg_hba.conf) is
not the same as connecting to localhost over TCP.
 
P

Philipp Ott

Hi!
I'm trying to access a PostgreSQL database on my machine, however, I get
the following error:
irb(main):003:0> conn = PGconn.connect("localhost", 5432, "", "",
"music")
PGError: FATAL: IDENT authentication failed for user "kdresner"
from (irb):3:in `connect'
from (irb):3
I created the database, so I should have the rights to access it...

Most of the times we are experiencing such problems the following
stuffs were wrong.

1) postgres needs to be startet with -i (for TCPIP access)

2) pg_hba.conf has to include host 127.0.0.1 and preferable also the
own IP address - for some reasons on some installations the postgres
library connects to 127.0.0.1 with some eth0 interfaces IP address and
then it didnt work unless this IP was also listed in pg_hba.conf.
Haven't figured out yet why :-(

3) createuser somebody

You can also look into postgres[ql].log and check there for error
messages.

Regards
Philipp Ott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,169
Latest member
ArturoOlne
Top