我为postgesql创建了新实例,但是无法使用pgAdmin3
登录我正在使用Windows 7和PostgreSQL 9.5
这就是我所做的:
在D盘中提取postgresql-9.5.0-1-windows-x64-binaries
打开cmd(管理员帐户)
创建数据文件夹
使用initdb命令
使用pg_ctl命令启动和停止日志文件
使用pg_ctl register命令注册服务
编辑postgresql.conf
change port from 5432 to 5433
listen_addresses = localhost
listen_addresses = *
编辑pg_hba.conf
Add IPv4 local connections
host all all samenet md5
启动服务
最后,在新实例创建的数据文件夹中添加完全控制的网络和本地服务。
------在此过程中我没有遇到任何问题。
但是当我使用pgAdmin3登录postgres帐户甚至管理员帐户时,会发生同样的错误。
我不知道我错过了什么。
答案 0 :(得分:0)
尝试将身份验证方法更改为信任。因此,您无需密码即可登录。
Add IPv4 local connections
host all all 127.0.0.1/32 trust
在我的情况下,我允许所有localhost用户无需密码登录。
如果您使用md5
客户端将需要密码进行身份验证,如果您使用trust
客户端可以无需密码登录。