Unable to access to the postgresql database server remotely
-
10-12-2019 - |
Question
I noticed that my postgresql is accessible only in my localhost after I issued the following command in linux terminal (Suse Linux - SLES 11 SP2 64bit):
# netstat -an 10.64.72.202 | grep 5432
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5432 127.0.0.1:33304 ESTABLISHED
tcp 0 0 ::1:5432 :::* LISTEN
tcp 0 0 127.0.0.1:33304 127.0.0.1:5432 ESTABLISHED
unix 2 [ ACC ] STREAM LISTENING 2739454 /tmp/.s.PGSQL.5432
unix 3 [ ] STREAM CONNECTED 4225466 /tmp/.s.PGSQL.5432
unix 3 [ ] STREAM CONNECTED 4104233 /tmp/.s.PGSQL.5432
unix 3 [ ] STREAM CONNECTED 2839271 /tmp/.s.PGSQL.5432
unix 3 [ ] STREAM CONNECTED 2816569 /tmp/.s.PGSQL.5432
My question is how I can make the postgresql server accessible from out world. I can ping to the machine where postgressql is installed but I cannot connect to the database itself. Thanks in advance.
Solution
You'll need to enable remote access for postgres on your machine.
Here is an tutorial which helped me to accomplish this for my setup.
Its an quite easy step-by-step guide for postgres versions < 7.x AND 8.x and newer.
Hope this helped, have Fun!
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow