Re: Connecting to a remote db server

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: "Struckhoff, Kevin" <kstruckhoff(at)ebay(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Connecting to a remote db server
Date: 2013-07-10 23:06:23
Message-ID: 20130710230623.GI4941@eldon.alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Struckhoff, Kevin wrote:
> I'm trying to use the psql tool:
>
> /home/postgres->psql test
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
>
> the answer of course is No..

Oh, well, you need to specify the hostname or address of the remote server:

psql -h db01 test

Otherwise, it's just trying to connect to localhost, as you've seen.

You might need to adjust pg_hba.conf on the db01 server to allow
connections from your app01 client host.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message javmendez1 2013-07-10 23:19:29 Re: Connecting to a remote db server
Previous Message Alvaro Herrera 2013-07-10 22:41:39 Re: Connecting to a remote db server