Re: Cannot reach pg server using -h localhost

From: Chris Mair <chris(at)1006(dot)org>
To: Fritz Meissner <fritz(dot)meissner(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Cannot reach pg server using -h localhost
Date: 2015-07-21 17:39:09
Message-ID: 381ca7e210e255c20afeab8855e3f0f9@smtp.hushmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-07-21 17:42:39 Re: Cannot reach pg server using -h localhost
Previous Message Adrian Klaver 2015-07-21 17:30:44 Re: Cannot reach pg server using -h localhost