我遇到了这个错误:
FATAL: Peer authentication failed for user "postgres"
当我尝试让Postgres与Rails配合使用时,遇到了一些问题。
这是我的pg_hba.conf
,我的database.yml
,以及完整跟踪信息的转储。
我在pg_hba中将认证方式更改为md5,并尝试了不同的方法,但都无法解决问题。
我还尝试按照Rails 3.2, FATAL: Peer authentication failed for user (PG::Error)的说明创建新用户和数据库。
但是它们在pgadmin上甚至在我运行sudo -u postgres psql -l
时也没有显示出来。
您有什么想法?
database.yml
文件中添加host: localhost
。 - Mihail Velikov