前言:Windows下對postgre開啟遠程連接權限,下面是實際操作過程中的手順
1.找到postgresql.conf文件,注意安裝路徑
- D:\Program Files (x86)\PostgreSQL\9.3\data
2.打開該文件,注意以下內容,確認為下面內容后,進行下一步
- listen_addresses = '*'
3.打開pg_hba.conf文件,注意以下內容
- # IPv4 local connections:
- host all all 127.0.0.1/32 md5
- host all all xxx.xxx.xxx.xxx/32 md5
xxx.xxx.xxx.xxx即為需要登錄的IP地址
4.在Windows的服務中重新啟動postgre服務
再次嘗試重新連接就OK了