我最近安装了PostgreSQL 9.1和pgAdmin3。但是我无法连接到使用以下配置创建的服务器:
name: mydb
host: 127.0.0.1
port: 5432
service:
Maintenance DB: postgres
username: postgres
password: *
根据类似问题,我已经将我的/etc/postgresql/9.1/main/pg_hba.conf
文件在Ubuntu 12.04 LTS下设置如下:
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
但是当我想连接服务器时,我遇到了这个错误:
连接服务器时出错:用户"postgres"的密码验证失败
用户"postgres"的密码验证失败
postgre
的用户并分配了密码? - Daniel Vérité