open port?

I think I've got postgresql 8.0 working on my system. But, the port doesn't seem to be open.

If I do:
  telnet localhost 5432
then it connects.

If I change localhost to be the ip of the server then it says the connection is refused despite the fact that I'm running it from that server.

What do I need to do to make it visible so I can use pgAdmin on it from a different machine?
Who is Participating?
earth man2Connect With a Mentor Commented:
in $PGDATA/postgressql.conf specify what ip addresses you want to listen on.
listen_addresses = '*'
or more securely
listen_addresses = 'localhost,NNN.NN.NNN.NN'

pg_ctl restart
earth man2Connect With a Mentor Commented:
You need to edit
Of course the login method you want to use wants to be a little more sophisticated than trust !
Set it to trust initially so you can get a connecttion then use a suitable METHOD

# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections:
host    all         all          trust
host    YOUR_DATABASE         YOUR_USER_ACCOUNT      trust
HappyEngineerAuthor Commented:
First I tried:
  host    all         postgres    192.168.NNN.1/24       md5
where NNN is the number I use on my home machine. I then did "pg_ctl reload" but I still couldn't connect with pgAdmin.

So then I tried:
  host    all         all         NNN.NN.NNN.NN/32      trust
where NNN.NN.NNN.NN is the ip address of the server. I then did "pg_ctl reload" and then tried telneting to it from the server and it still refuses the connection.
earth man2Commented:
Well 192.168.NNN.1/24  WILL NOT WORK because it will not traverse the internet.  You need the ip address of your internet connection in there.

use 24 instead of 32
HappyEngineerAuthor Commented:
That did it! The only remaining issue is that my development machine has a dynamic IP. I guess I'll just have to change it every time my IP updates.

Perhaps there's a dynamic IP DNS system or something?
All Courses

From novice to tech pro — start learning today.