当前位置:Gxlcms > 数据库问题 > PostgreSQL远端访问

PostgreSQL远端访问

时间:2021-07-01 10:21:17 帮助过:23人阅读

编辑实际安装环境中的postgresql.conf文件 2 vim /var/lib/pgsql/9.5/data/postgresql.conf 3 修改 4 #listen_addresses = localhost # what IP address(es) to listen on; 5
6
7 listen_addresses = * #use * for all

二、增加远端访问权限

1 编辑实际安装环境中的pg_hba.conf
2 vim /var/lib/pgsql/9.5/data/pg_hba.conf
3 4 # IPv4 local connections:
5 host all all 127.0.0.1/32 md5
6 下面增加这一行:
7 
8 host all all 0.0.0.0/0 password

这是基本的数据库配置,剩下的就是配置远端访问的用户了。

 

PostgreSQL远端访问

标签:编辑   conf   style   访问权限   local   class   address   lib   logs   

人气教程排行