PostgeSQL 9.5 允许远程访问
作者:
一剑无血冯稀饭 | 来源:发表于
2020-04-26 11:06 被阅读0次
修改pg_hba.conf文件,一般在安装目录下
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 0.0.0.0/0 trust #此行为添加,0.0.0.0/0为所有客户端都可以连接,trust是为了默认postgres用户也可以连接
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres trust
#host replication postgres 127.0.0.1/32 trust
#host replication postgres ::1/128 trust
修改postgresql.conf文件,一般和上一个文件在同级目录下
### listen_addresses = 'localhost'
listen_addresses = '*'
重启服务,不知道怎么重启,可以重启电脑
本文标题:PostgeSQL 9.5 允许远程访问
本文链接:https://www.haomeiwen.com/subject/lbldwhtx.html
网友评论