Re: Problem with starting up - Mailing list pgsql-general

From Nick Fankhauser
Subject Re: Problem with starting up
Date
Msg-id NEBBLAAHGLEEPCGOBHDGAEOCECAA.nickf@ontko.com
Whole thread Raw
In response to Problem with starting up  ("Nandu Garg" <focussed@rediffmail.com>)
List pgsql-general
Amol-

Answers to your several questions:


> $psql Connection to database 'amol' failed. FATAL 1:  Database
> amol does not exist in pg_database

This message simply means the database doesn't exist yet.



> command $createdb mydb Connection to database 'template1' failed.
> FATAL 1:  SetUserId: user 'amol' is not in 'pg_shadow'

This looks like the heart of your problem. You need to set your linux user
to postgres ("su - postgres" from root), and do a "createuser amol" if you
want to use the databse from your account.




> do I
> have to connect using 'postgres' user ..what is the password by
> default

Generally, by default the authorization method is "peer sameuser" after
initial install, meaning that if you are logged into linux as a user that
exists in pg_shadow, you are authorized. the user "postgres" is initially
there, so just su to postgres while you create other user accounts using
createuser. Later you may want to choose a more secure auth method. Search
the interactive documentation for "pg_hba.conf" to learn more about
authorization methods & how to set them.

Hope this helps you get started! Welcome to postgresql.

-Nick

--------------------------------------------------------------------------
Nick Fankhauser  nickf@ontko.com  Phone 1.765.935.4283  Fax 1.765.962.9788
Ray Ontko & Co.     Software Consulting Services     http://www.ontko.com/


pgsql-general by date:

Previous
From: "Nandu Garg"
Date:
Subject: Problem with starting up
Next
From: Fariba Noorbakhsh
Date:
Subject: XML document!