Error with python and postgresql

0

Error:

  

Is the server running on host "localhost" (127.0.0.1) and accepting   TCP / IP connections on port 5432?

already install postgresql in its recent version but it does not remain. When I run the application I use django python (virtual environment) and I get the error.

and the pgadmin4 if you run in the browser and modify the file of the ip: 127.0.0.1 leaving it in 0.0.0.0 .

Or how do you recommend working the postgresql I use Debian 9 stretch ?

    
asked by Miguel 12.04.2018 в 06:47
source

1 answer

0

I imagine you are using a Linux system ...

Well PosgreSQL to access it you have to modify the file: pg_hba.conf, look for the lines that says:

#"local" is for Unix domain socket connections only

the next line "local all all peer" change it by:

local   all             all                                     md5

reiciniar the server with:

systemctl restart postgresql.
    
answered by 16.04.2018 в 15:38