Re: createdb: could not connect to database - Mailing list pgsql-novice

From Devrim GUNDUZ
Subject Re: createdb: could not connect to database
Date
Msg-id 1139078286.4139.21.camel@evim.gunduz.org
Whole thread Raw
In response to Re: createdb: could not connect to database  (Paul Smith <phhs80@gmail.com>)
List pgsql-novice
Hi,

On Sat, 2006-02-04 at 17:56 +0000, Paul Smith wrote:

> Did you start postgresql service?
> >
> > # service postgresql start
>
> Thanks, Devrim. After "service postgresql start", I get
>
> $ createdb mydb
> createdb: could not connect to database postgres: FATAL:  role
> "psmith" does not exist
> $

- By default, RPM installations use ident authentication. This basically
means that you must be postgres user to access to PostgreSQL. First su
to root, and the su to postgres and run createdb then. (you cannot
directly su to postgres since it does not have an initial password)

- You can also edit pg_hba.conf to allow access to regular users:
http://www.postgresql.org/docs/8.1/static/client-
authentication.html#AUTH-PG-HBA-CONF

- You can create psmith role and allow access to that user.

Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/


pgsql-novice by date:

Previous
From: Paul Smith
Date:
Subject: Re: createdb: could not connect to database
Next
From: Andreas Kretschmer
Date:
Subject: Re: createdb: could not connect to database