我已经安装了PostgreSQL。但是每次我尝试通过PGAdmin或psql连接时,都会出现以下错误。
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and
accepting TCP/IP connections on port 5432?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and
accepting TCP/IP connections on port 5432?
我检查了 postgresql.conf
文件,发现这一行没有被注释掉:listen_addresses = '*'
此外,我的 pg_hba.conf
文件是这样设置的:
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
有谁能给我建议,告诉我如何解决这个问题吗?
谢谢!
pg_hba.conf
, notpg_hba.conf.txt
- Roman Tkachuk