Skip site navigation (1) Skip section navigation (2)

Re: Best starter book

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Donn Washburn <n5xwb(at)comcast(dot)net>
Cc: NOVICE Postgres elist <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Best starter book
Date: 2010-05-21 17:59:40
Message-ID: 21640.1274464780@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Donn Washburn <n5xwb(at)comcast(dot)net> writes:
> This is an example of the problem.
> I went to http://www.postgresql.org/docs/current/static/ and started 
> looking at everything until  /tutorial-createdb.html.  Where it states 
> createdb.

> I get as a (system user)donn(at)m1l-suse:~> createdb mydb
> createdb: could not connect to database postgres: FATAL:  Ident 
> authentication failed for user "donn"

Well, the reason you're not likely to find this covered as the first
item in any Postgres book is that it's specific to particular
configurations.  Evidently you have got an installation that sets up
"ident" as the standard login authentication method, which is common
in Linux packagings of PG but it's not the factory default.  Anyway
ident insists (by default, again) that your OS-level user name match
the database user name you're trying to log in as.  Now since you
don't have a database user named "donn", that fails.  The only database
user you do have, most likely, is postgres.  So the first thing you want
to do is something like

	sudo su - postgres
	createuser donn
	^D

and now you'll be able to connect as user donn.  NB: createuser will
ask whether to make donn a superuser, which you probably want if
you're just playing around.

			regards, tom lane

In response to

pgsql-novice by date

Next:From: gargoyle60Date: 2010-05-21 19:08:22
Subject: Re: Best starter book
Previous:From: Tom LaneDate: 2010-05-21 17:38:44
Subject: Re: howto find dependencies

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group