Thread: Error: The database does not exist on the server

Error: The database does not exist on the server

From
Steve Bond
Date:
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.


Re: Error: The database does not exist on the server

From
Jeffrey Melloy
Date:
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


Re: Error: The database does not exist on the server

From
Oliver Elphick
Date:
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.Elphick@lfix.co.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


Re: Error: The database does not exist on the server

From
Steve Bond
Date:
I have started postmaster with -i, changed tcpip=true and edited my
pg_hba.conf file. The server accepts the connection, and if I enter the
wrong username and password authentication fails. The problem is that when
I use the correct username and password it pauses for about a minute and
then returns the 'database does not exist error'. It does it for all
databases, although they are listed unger psql -l


Re: Error: The database does not exist on the server

From
Wim
Date:
Do you send your postmaster output to a logfile?

Can you connect locally with the same user/passw?

Cheers!

Wim


On Mon, 2003-09-15 at 11:10, Steve Bond wrote:
> I have started postmaster with -i, changed tcpip=true and edited my
> pg_hba.conf file. The server accepts the connection, and if I enter the
> wrong username and password authentication fails. The problem is that when
> I use the correct username and password it pauses for about a minute and
> then returns the 'database does not exist error'. It does it for all
> databases, although they are listed unger psql -l
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html


Cheers!
Wim De Hul
------------------------------------------------------------------------------
IP SERVICES SPECIALIST
Belgacom Carrier and Wholesale Business Unit (CBU)
------------------------------------------------------------------------------
AS6774
Ripe : WDH25-RIPE
reply-to : NOC{at}belbone{dot}be
peering : peering{at}belbone{dot}be
NOC Tel : +32 2/547.51.00
www.belgacom.be/carrier
------------------------------------------------------------------------------
"Black holes are where God divided by zero."
- Steven Wright
------------------------------------------------------------------------------
3:04pm up 6 days, 2:50, 1 user, load average: 1.35, 1.40, 1.51