Thread: beginner problem connecting to database

beginner problem connecting to database

From
"James Dean"
Date:
Hi all,

Okay, it's stupid; how do I connect to the database that I want to use, rather
that template1? Other that Tools|options|master database. I'm trying out
Postgres and PGAdmin, and so far I can't get past this reeealy simple problem.

Thanks,
James


Re: beginner problem connecting to database

From
Dave Page
Date:

> -----Original Message-----
> From: James Dean [mailto:jfdean@ihug.com.au]
> Sent: 04 March 2002 21:34
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] beginner problem connecting to database
>
>
> Hi all,
>
> Okay, it's stupid; how do I connect to the database that I
> want to use, rather that template1? Other that
> Tools|options|master database. I'm trying out Postgres and
> PGAdmin, and so far I can't get past this reeealy simple problem.
>

Hi,

pgAdmin allows you to browse/use an entire PostgreSQL server. In order to
examine that server, a connection is first made to the Master Database (99%
of the time, template1 should be fine for this) which is used to retrieve a
a list of the other databases.

Once you have connected, you can either create a new database (try a right
click over the treeview or listview) or double click the Databases icon on
the treeview to list the existing databases on the server. pgAdmin 1.2.0 and
earlier will open a connection to all databases at this point and you can
just browse through them and the objects within them using the treeview (the
current development code only opens connections when you actually select a
database). If you wish to enter an SQL query by hand, look at the 'Current
Database' in the status bar - when you open the SQL Window, it will used
with the current database at the time it was opened.

HTH, Regards, Dave.

Re: beginner problem connecting to database

From
Dave Page
Date:

> -----Original Message-----
> From: James Dean [mailto:jfdean@ihug.com.au]
> Sent: 05 March 2002 01:37
> To: Dave Page
> Subject: Re: [pgadmin-support] beginner problem connecting to database
>
>
> Thanks Dave, but...
>
> whatever, however, the database that I wanted to work on had
> a red cross
> on it. I was logged in to the server as athe owner of the database.
>

Ahh, that means that pgAdmin's connection to that database has failed. This
is normally for one of 3 reasons:

- pgAdmin has exceeded the number of allow connections on your server. This
can be modified in your $PGDATA/postgresql.conf file. Future versions of
pgAdmin will be a little less connection hungry.

- your $PGDATA/pg_hba.conf file on the server doesn't contain an entry that
will allow your client PC to connect to that database

- The system table pg_database (access it from template1) contains a row for
each database. If the datallowconn column for your database is set to false,
then no connections will be allowed to this database.

Regards, Dave.