From: | Holger Krug <hkrug(at)rationalizer(dot)com> |
---|---|
To: | Nandu Garg <focussed(at)rediffmail(dot)com> |
Cc: | pgsql-general(at)postgresqlorg |
Subject: | Re: Problem with starting up |
Date: | 2002-01-11 12:10:37 |
Message-ID: | 20020111131037.A26764@dev12.rationalizer.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Jan 11, 2002 at 11:35:12AM -0000, Nandu Garg wrote:
> when I issue following command at my prompt It gives me following error
> $psql
> Connection to database 'amol' failed.
> FATAL 1: Database amol does not exist in pg_database
If you do not give a database name, your user name is taken as default. psql
tries to connect to database 'amol' and fails.
> When I issued following command
> $createdb mydb
> Connection to database 'template1' failed.
> FATAL 1: SetUserId: user 'amol' is not in 'pg_shadow'
If your Linux system is correctly installed `man createdb' should give
you all the necessary information. For creating new databases you have
to be a valid PostgreSQL user with CREATE DATABASE permission.
Initially there is only one user, named `postgres'. So calling
$ createdb -U postgres newdb
should work fine. (But look at the man page first!)
To create a new user, e.g. yourself, look at `man createuser' and `man
create_user'. E.g. the following should work fine:
$ psql -U postgres newdb
newdb=# CREATE USER amol;
CREATED
newdb=# \q
$ psql newdb # now you can connect as yourself !
> Do I have to connect using 'postgres' user ..what is the password by default
No password by default.
--
Holger Krug
hkrug(at)rationalizer(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Fariba Noorbakhsh | 2002-01-11 13:56:58 | XML document! |
Previous Message | Nandu Garg | 2002-01-11 11:35:12 | Problem with starting up |