postgresql - Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? -


i'm working on django. use postgresql database.

full error says:

could not connect server: connection refused (0x0000274d/10061) server running on host "localhost" (::1) , accepting tcp/ip connections on port 5432? 

do have idea?

wild stab in dark: you're on machine ipv6 resolver localhost defaults ipv6 address ::1, listen_addresses in postgresql.conf set 127.0.0.1 or 0.0.0.0 not * or you're using older postgresql built c library doesn't have transparent ipv6 support.

change listen_addresses localhost , make sure localhost resolves both ipv4 , ipv6 addresses, or set ::1, 127.0.0.1 explicitly specify both ipv4 , ipv6. or set * listen on interfaces. alternately, if don't care ipv6, connect 127.0.0.1 instead of localhost.

see this google search or this stack overflow search more information.

(posting despite close-vote because voted question migration).


Comments