如何让postgresql支持远程登录呢?
只需要在服务器端配置
修改两个文件:
pg_hba.conf
postgres.conf
重启数据库或者pg_ctl reload即可。
-----------------
比如环境中db server ip为192.168.3.2,
客户端的ip为192.168.3.221
在postgresql.conf文件添加:
listen_addresses = '*'
在pg_hba.conf文件添加:
host all all 192.168.3.221/32 trust
就可以在192.168.3.221上访问192.168.3.2了。
如何让postgresql支持远程登录?
猜你喜欢
转载自javakill.iteye.com/blog/1949169
今日推荐
周排行