Error: The database does not exist on the server

Lists: pgsql-novice
From: Steve Bond <bondy(at)skysurf-airdsl(dot)co(dot)uk>
To: pgsql-novice(at)postgresql(dot)org
Subject: Error: The database does not exist on the server
Date: 2003-09-12 14:50:32
Message-ID: 5.2.1.1.0.20030912153324.00abe098@mailserver.skysurf-airdsl.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

I'm running postgresql on a linux box and having trouble connecting to my
database from another machine. When I do

>psql -l

I get a list of 4 databases but I cannot connect to any of them remotely,
as they cannot be found. I'm using

/var/lib/pgsql/data/

as my data directory. Am I using the wrong directory or is there a way to
specify which directory for the client machine to look in?
Thanks in advance.


From: Jeffrey Melloy <jmelloy(at)visualdistortion(dot)org>
To: Steve Bond <bondy(at)skysurf-airdsl(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Error: The database does not exist on the server
Date: 2003-09-14 23:03:58
Message-ID: B9355961-E707-11D7-AF83-000393C78AC0@visualdistortion.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

A couple things need to be done. On the server, PostgreSQL needs to be
started with the -i option (or set enable_tcpip to true in
/var/lib/pgsql/data/postgresql..conf).

/var/lib/pgsql/data/pg_hba.conf needs to be edited to allow certain IP
addresses (the client machines).

See the Adminstratior Guide for more information.

Jeff
On Friday, September 12, 2003, at 09:50 AM, Steve Bond wrote:

> I'm running postgresql on a linux box and having trouble connecting to
> my database from another machine. When I do
>
> >psql -l
>
> I get a list of 4 databases but I cannot connect to any of them
> remotely, as they cannot be found. I'm using
>
> /var/lib/pgsql/data/
>
> as my data directory. Am I using the wrong directory or is there a way
> to specify which directory for the client machine to look in?
> Thanks in advance.
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org


From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Steve Bond <bondy(at)skysurf-airdsl(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Error: The database does not exist on the server
Date: 2003-09-14 23:07:40
Message-ID: 1063580860.18281.1691.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

On Fri, 2003-09-12 at 15:50, Steve Bond wrote:
> I'm running postgresql on a linux box and having trouble connecting to my
> database from another machine. When I do
>
> >psql -l
>
> I get a list of 4 databases but I cannot connect to any of them remotely,
> as they cannot be found. I'm using
>
> /var/lib/pgsql/data/
>
> as my data directory. Am I using the wrong directory or is there a way to
> specify which directory for the client machine to look in?
> Thanks in advance.

You cannot connect from another machine unless you tell the postmaster
on the server to allow it. The postmaster must be started with the -i
option or else you must have `tcpip_socket = true' in postgresql.conf
(in the database directory). You must also configure pg_hba.conf to
allow host connections from the remote machine.

The remote client does not need to know anything about where the
database is stored on the server.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"The fool hath said in his heart, There is no God..."
Psalm 14:1