我正在尝试从
pgAdmin III连接到远程数据库.我创建了一个“新服务器注册”.当我连接到数据库时,我得到“访问数据库被拒绝”.
我设置正确.这些是我的Postgresql设置:
> pg_hba.conf>
Postgresql客户端身份验证配置文件
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all postgres trust
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
# Allow replication connections from localhost,by a user with the
# replication privilege.
host all all 192.168.0.0/16 md5
> postgresql.conf>我允许所有输入连接listen_addresses =’*’
使用SSH我可以连接到数据库:
[fuiba@test]$psql -h localhost -p 26888 -d postgres
psql (9.1.11)
Type "help" for help.
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
--------------+---------+----------+---------+-------+---------------------
postgres | fuiba | UTF8 | C | C |
template0 | fuiba | UTF8 | C | C | =c/fuiba +
| | | | | fuiba=CTc/fuiba
template1 | fuiba | UTF8 | C | C | =c/fuiba +
| | | | | fuiba=CTc/fuiba
(3 rows)
我究竟做错了什么?任何帮助将受到高度赞赏.谢谢!
ps:我在Windows 7上运行pgAdmin III,在Linux CentOS上运行Postgresql.
如果觉得《pgadmin3连接mysql_postgresql – pgAdmin III:拒绝访问数据库》对你有帮助,请点赞、收藏,并留下你的观点哦!