1: ssh 登录远程的PostgreSQL database server:
ssh username@ipaddress2: Enable client authentication:
编辑 /etc/postgresql/9.1/main目录下的文件:
postgresql.conf:
将 listen_addresses= 'localhost' 换成
listen_addresses= '*'
pg_hba.conf
在IPv4 local connections下面,添加:(sudo vi 打开)
host all all 0.0.0.0/0 md5
3: Restart PostgreSQL Server
sudo /etc/init.d/postgresql start4: Access command
psql -h IPadrress -U username -d database
1938

被折叠的 条评论
为什么被折叠?



