查看侦听的端口:
[root@edb ~]# cat /opt/PostgresPlus/9.2AS/data/postgresql.conf | grep listen_address
listen_addresses = '*' # what IP address(es) to listen on;
查看允许访问的网段或机器: [root@edb ~]# cat /opt/PostgresPlus/9.2AS/data/pg_hba.conf
# 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
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication enterprisedb md5
#host replication enterprisedb 127.0.0.1/32 md5
#host replication enterprisedb ::1/128 md5
这里看到在pg_hba.conf文件里,只允许本地连接数据库,所以其他机器使用管理工具是没有办法连接到数据库。
在pg_hba.conf文件的最后,添加一行: host all all 192.168.56.0/16 md5