天天看點

msf資料庫配置問題解決

錯誤資訊:

Failed to connect to the database: could not connect to server: Connection refused
        Is the server running on host "127.0.0.1" and accepting
        TCP/IP connections on port 5432?
           

解決方法:

這個問題的原因是你沒有配置資料庫的準許通路,一般在這個位置

vi /var/lib/pgsql/data/pg_hba.conf

           

得配置成這樣

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          ident
# IPv6 local connections:
host    all         all         ::1/128               ident
           

ok,就這樣解決

主要參考的這裡:

http://blog.csdn.net/bnxf00000/article/details/44872709