Re: Getting Started: user doesn't exist - Mailing list pgsql-novice

From John Purser
Subject Re: Getting Started: user doesn't exist
Date
Msg-id 20060902070236.6684c29d.jmpurser@gmail.com
Whole thread Raw
In response to Re: Getting Started: user doesn't exist  ("Eric M. Cherry" <cherry_eric@sbcglobal.net>)
Responses Re: Getting Started: user doesn't exist
List pgsql-novice
On Sat, 2 Sep 2006 08:37:45 -0500
"Eric M. Cherry" <cherry_eric@sbcglobal.net> wrote:

> emc wrote:
>
> Richard replied:
>

> 4.  A command shell opens, giving me the prompt:
>
>      C:\Program Files\PostgreSQL\8.1\bin>
>
> 5.  I type:
>
>      C:\Program Files\PostgreSQL\8.1\bin>createdb mydb [enter]
>
> 6.  The system yields the following error:
>
>      createdb: could not connect to database postgres: FATAL:  role
> "emc" does not exist
>
> 7.  I am left back at the prompt.
> 8.  Not to be deterred, I type:
>
>      C:\Program Files\PostgreSQL\8.1\bin>createuser emc
>
> 9.  The system gives me a prompt:
>
>      Shall the new role be a superuser? (y/n)
>
> 10.  I type "y" [enter]
> 11.  The system yields an error message:
>
>      createuser: could not connect to database postgres: FATAL:  role
> "emc" does not exist
>
> 12.  I open Outlook and email the Novice List.
>
> I think that it's noteworthy that pgAdmin III lets me perform the
> tasks of making new databases without trouble.  This tells me that
> the tasks can be done on my computer, but that I'm leaving out some
> basic step.  (To give you an idea of how basic, I spent ten minutes
> getting the error that the port wasn't listening.  I finally stumbled
> to the trick that I had to "start service" first.  That gives you an
> idea of the sort of basic step I'm apt to miss out of sheer
> ignorance.)
>
Eric,

Good analysis overall.

PostgreSQL is telling you that it doesn't know who 'emc' is.  You see
postgreSQL user accounts (called roles) are entirely separate from the
Operating System (in your case windows) users.  Try
connecting (or createdb or createuser) with the '-U postgres' flag set
and see what happens.

John Purser

pgsql-novice by date:

Previous
From: "Eric M. Cherry"
Date:
Subject: Re: Getting Started: user doesn't exist
Next
From: "Eric M. Cherry"
Date:
Subject: Re: Getting Started: user doesn't exist