postgresql - Error connection pgadmin 4 -


i add server , there error image

i use pgadmin4

how can fix this?

firstly, check if server listening. use following command on server:

netstat -nlt|grep :5432 

if it's ok, ssh (or whatever method use access server) server , view file:

/etc/postgresql/9.1/main/postgresql.conf 

find line start with:

listen_addresses= 

if value after "=" 'localhost', means cannot connect outside. able so, change to:

listen_addresses='*' 

now able connect anywhere, outside server itself. and, don't forget restart dbms , check if works.


ah. 1 more thing, may need give user access rights database well.

open file:

/etc/postgresql/9.1/main/pg_hba.conf 

and add:

host all * md5 

you need restart dbms fire changes.


p/s: should enable ssl.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -