pgAdmin在端口5432上找不到在本地计算机上运行的postgres。
pg_isready -h localhost
返回肯定结果(accepting connections
)。
psql -h localhost -d django_db
也允许访问数据库。
尝试通过pgAdmin访问它会返回
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
could not connect to server:
Address not available
Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?