1. 程式人生 > >could not connect to server: Connection refused(0x0000274D/10061)

could not connect to server: Connection refused(0x0000274D/10061)

Navicat Premium 12 連線 PostgreSQL 時出現的問題:

could not connect to server: Connection refused(0x0000274D/10061)

Is the server running on host "192.168.113.154" and accepting TCP/IP connections on 5432?

無法連線到伺服器:連線被拒絕(0x0000274D / 10061)

伺服器是否在主機“192.168.113.154”上執行並且在5432上接受TCP / IP連線?

原因:

未監聽所有IP:

修改配置檔案postgresql.conf: 將11

替換成你所安裝的版本:

vim /var/lib/pgsql/11/data/postgresql.conf

修改為:

listen_addresses = '*'

如果註釋了,請開啟註釋。 重啟伺服器:

systemctl restart postgresql-11