【发布时间】:2014-09-09 10:42:05
【问题描述】:
我正在创建一个 Rails 应用程序并想使用 postgresql。我已经在 Ubuntu 14.04 上安装了 pgadmin、postgres 服务器。我尝试通过 pgAdmin 创建连接,但无法创建它。我无法配置 pgadmin 来创建到 pg 服务器的连接。
我尝试编辑/etc/postgresql/9.3/main/pg_hba.conf 文件,但出现以下错误:
致命:用户“postgres”的对等身份验证失败
这里是“pg_hba.conf”文件
Database administrative login by Unix domain socket
local all postgres peer
TYPE DATABASE USER ADDRESS METHOD
"local" is for Unix domain socket connections only
local all all peer
IPv4 local connections:
host all all 127.0.0.1/32 md5
IPv6 local connections:
host all all ::1/128 md5
Allow replication connections from localhost, by a user with the
replication privilege.
local replication postgres peer
host replication postgres 127.0.0.1/32 md5
host replication postgres ::1/128 md5
如果有人能提供配置方面的帮助,我将不胜感激。
【问题讨论】:
标签: ruby-on-rails postgresql ubuntu-14.04 pgadmin