2011-09-07 148 views
0

這麼久以來我就開始研究一個項目,並且我有很多事情需要設置才能開始。其中之一是PostgreSQL。我試圖讓它安裝,但我遇到了一些問題。我可以在服務器啓動,但後來當我去設置它,我得到以下:麻煩設置Postgres

Lady: anthonygarand$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start 
server starting 

Lady: anthonygarand$ psql template1 
psql: could not connect to server: Permission denied 
Is the server running locally and accepting 
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"? 

任何幫助將非常感激。如有必要,我可以提供更多細節。請讓我知道..我對這個東西瞭解不多。

謝謝!

回答

1

您的文件系統上存在偵聽套接字嗎? (也許unixdomein套接字位於不同的目錄中(/ tmp /)似乎有預先打包的二進制文件包含不同位置的偵聽套接字。) 如果它位於該位置,則應檢查postgres.conf和pg_hba.conf的。