您好,登錄后才能下訂單哦!
小編給大家分享一下postgresql設置服務端監聽的方法,希望大家閱讀完這篇文章后大所收獲,下面讓我們一起去探討吧!
配置步驟:
一、修改服務端/opt/PostgreSQL/9.3/data/postgresql.conf文件
#listen_address='localhost'
改成
listen_address='*'
二、修改/opt/PostgreSQL/9.3/data/gp_hba.conf文件
在"# IPv4 local connections:"下面增加一行:
# TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections: host all all 127.0.0.1/32 trust #Added by goopand host all all 192.168.56.1/32 trust #Another entry host all all 0/0 md5 # IPv6 local connections: host all all ::1/128 trust # Allow replication connections from localhost, by a user with the # replication privilege. #local replication postgres trust #host replication postgres 127.0.0.1/32 trust #host replication postgres ::1/128 trust
三、重啟PG服務
$ cd /opt/PostgreSQL/9.3/bin $ ./pg_ctl restart waiting for server to shut down.... done server stopped server starting [postgres@inspA bin]$ LOG: database system was shut down at 2014-10-28 16:14:53 CST LOG: database system is ready to accept connections LOG: autovacuum launcher started
看完了這篇文章,相信你對postgresql設置服務端監聽的方法有了一定的了解,想了解更多相關知識,歡迎關注億速云行業資訊頻道,感謝各位的閱讀!
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。