Re: Permission Problems:-)?

From: Richard Huxton <dev(at)archonet(dot)com>
To: Jerome Lyles <susemail(at)hawaii(dot)rr(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Permission Problems:-)?
Date: 2004-01-27 10:05:16
Message-ID: 200401271005.16237.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 27 January 2004 09:31, Jerome Lyles wrote:
> I'm trying to build a database. But none of the users I try to use works.
>
> I as normal user doesn't work:
> :~> createdb mydb
>
> createdb: could not connect to database template1: FATAL: user "adriel"
> does not exist
>
> I as postgresql user doesn't work:
> :~> createdb mydb
>
> createdb: could not connect to database template1: FATAL: user "mypostgre"
> does not exist

OK - it's complaining it can't connect to template1. This is the database that
contains all the default tables/types/functions etc. that will appear in your
new database.

First thing to check is that PG is running. Does it show up in "ps auxw | grep
postgres"?

If it's running you should check if you can connect to the template1 database
normally. As the postgres user try "psql template1" and see if you can
connect to the DB. If not, you need to look at your pg_hba.conf file
(probably in /var/lib/pgsql/data or similar) and also read the chapter on
client authentication in the manuals (tip - start with trust for localhost
and work outwards).

If PG is running and you can connect to the template1 database, try the
command again (as user postgres). If it still doesn't work log into template1
and try a "CREATE DATABASE" command (see manual for details). Then, come back
to the list and let us know what happened.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martin Atukunda 2004-01-27 10:27:21 Broken Link on techdocs
Previous Message Richard Huxton 2004-01-27 09:51:54 Re: Reloading Template1