2016-03-05 172 views
0

我在Amazon Web Services Ubuntu虛擬機上運行PostgreSQL。我已經設置了安全組,以允許從0.0.0.0,我已經設置了hba_conf文件允許從無法遠程連接到postgres服務

host all all 0.0.0.0/0 md5 

我已經重新啓動服務器和PostgreSQL連接。我無法連接到數據庫。 當我試圖從Ubuntu的筆記本電腦連接,我得到

psql: FATAL: Peer authentication failed for user "[email protected]:XXXX" 

當我嘗試從pgAdmin的連接運10臺機器上我得到

Server Does Not Listen 

應該是什麼我解決這個接下來的步驟是什麼?

回答

0

問題是,雖然我已經從對等切換到md5身份驗證,但我還沒有爲postgres用戶設置加密密碼。

$ su - postgres 
$ psql 
postgresql #= \password 

設置一個密碼,我是能夠連接到。