我最近安装了
postgresql 9.1和pgadmin3.但是我无法连接到使用此配置创建的服务器:
name: mydb host: 127.0.0.1 port: 5432 service: Maintenance DB: postgres username: postgres password: *
根据类似的问题,我在ubuntu 12.04 LTS下设置了/etc/postgresql/9.1/main/pg_hba.conf文件,如下所示:
local all postgres md5 # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all md5 # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5 host all all localhost trust
但是当我想连接到服务器时,我得到这个错误:
Error connecting to the server: FATAL: password authentication Failed for user “postgres”
FATAL: password authentication Failed for user “postgres”