Re: Cannot reach pg server using -h localhost - Mailing list pgsql-general

From Chris Mair
Subject Re: Cannot reach pg server using -h localhost
Date
Msg-id 381ca7e210e255c20afeab8855e3f0f9@smtp.hushmail.com
Whole thread Raw
In response to Cannot reach pg server using -h localhost  (Fritz Meissner <fritz.meissner@gmail.com>)
Responses Re: Cannot reach pg server using -h localhost  (Fritz Meissner <fritz.meissner@gmail.com>)
List pgsql-general
> So that's all good. If I use -h it doesn't work:
>
> psql -Umyuser -d mydb -h localhost

> listen_addresses = 'localhost'     # also '*', '127.0.0.1', '::1'


Use netstat to look what IP postgres actually binds to.
OS X uses the BSD syntax:

netstat -an

For example on my Mac (not homebrew):

tcp4       0      0  127.0.0.1.5432         *.*
LISTEN
tcp6       0      0  ::1.5432               *.*
LISTEN

Bye,
Chris.




pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Cannot reach pg server using -h localhost
Next
From: Adrian Klaver
Date:
Subject: Re: Cannot reach pg server using -h localhost