PostgreSQL安裝後Navicat客戶端連接報錯如下:
postgresql.conf
#listen_addresses = '*'
listen_addresses = '*'
pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
host all all 0.0.0.0/0 trust
1.查看防火牆狀態
systemctl status firewalld
firewall-cmd --state #查看默認防火牆狀態(關閉後顯示notrunning,開啓後顯示running)
2.查看防火牆是否開機啓動
systemctl is-enabled firewalld
3.關閉防火牆
systemctl stop firewalld
systemctl stop firewalld.service
systemctl status firewalld
4.禁用防火牆(系統啓動時不啓動防火牆服務)
systemctl disable firewalld
systemctl disable firewalld.service
systemctl is-enabled firewalld
上面文件已修改,防火牆已關閉,還是連不上。。。
後來發現申請的服務器是給的堡壘機的(測試或線上環境用的),是不允許連接的。。。
然後又重申的開發環境的服務器。。。