1.如果服务器启用了防火墙,需要在防火墙上开启 5432 端口。

2.修改 PostgreSQL 配置文件 postgresql.conf、postgresql.conf,Linux 配置文件所在路径 /etc/postgresql/9.1/main

其中:配置文件 postgresql.conf 中删除 Connection Settings 段部分注释,修改为:

listen_addresses = '*' 
port = 5432 
max_connections = 100 

其中:配置文件 pg_hba.conf 中 IPv4 local connections 段添加行 host all all 192.168.0.0/16 md5 ,修改为:

# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.0.0/16 md5

postgresql 开启远程访问

相关文章:

  • 2021-04-18
  • 2021-09-09
  • 2021-06-13
  • 2022-02-24
  • 2021-08-13
  • 2021-09-30
猜你喜欢
  • 2021-04-25
  • 2022-12-23
  • 2021-12-19
  • 2021-12-19
  • 2021-04-19
相关资源
相似解决方案