Re: psqsl -> remote db

From: jcradock(at)me3(dot)com
To: "Andrew Stewart" <astew(at)wam(dot)umd(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: psqsl -> remote db
Date: 2005-08-04 18:41:10
Message-ID: 60782.24.39.0.254.1123180870.squirrel@secure.me3.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

First, makes sure the PostgreSQL database is listening for TCP/IP
connections on the computer you're trying to connect to. On Mac OS X, run
this command in the a terminal, i.e. Terminal.app:

netstat -l

You should see a line like this somewhere in the output:

tcp6 0 0 *.5432 *.* LISTEN

Second, the database server's pg_hba.conf likely needs to be configured to
accept connections from remote users. This can be done to restrict
connections from specific hosts (IP addresses), which isn't terribly
practical, or by user and encrypted password. Search the PostgreSQL
document site for "pg_hba.conf" for info.

Third, if the database server is listening, and it is configured to allow
you to connect, try connecting with psql:

psql -h myhost.com -U me mydb

"myhost.com" can be an IP address. Type "man psql" to see what the options
mean.

I hope this helps.

Jim

> I'm sorry, I'm sure I should be asking this someplace more general, but
> apparantly the word 'port' is used in so many different contexts that a
> google search turns up fruitless ;)
>
> I'm just trying to access a remote postgresql database on port 5432,
> which does not appear to be open on the remote computer. I'm on a
> MacOSX and cannot figure out for the life of me how to open up this
> port on the computer.
>
> This is probably a unix question if anything, but any help would be
> apprecaited.
>
> -Andrew
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
>

-----
James Cradock, jcradock(at)me3(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Youngblood 2005-08-04 18:53:00 Re: psqsl -> remote db
Previous Message Andrew Stewart 2005-08-04 18:26:54 psqsl -> remote db