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

Re: Real novice question: Roles

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Real novice question: Roles
Date: 2011-11-18 15:22:03
Message-ID: 20111118162203.1726d2ec@anubis.defcon1 (view raw or flat)
Thread:
Lists: pgsql-novice
On Fri, 18 Nov 2011 15:07:59 +0000
Phil Dobbin <phildobbin(at)gmail(dot)com> wrote:

> sh-3.2# su postgres

su - postgres

> bash-3.2$ whoami
> _postgres
> 
> bash-3.2$ /opt/local/lib/postgresql90/bin/postgres -D\
> > /opt/local/var/db/postgresql90/defaultdb
> LOG:  database system was shut down at 2011-11-18 03:19:30 GMT
> LOG:  autovacuum launcher started
> LOG:  database system is ready to accept connections
> 
> `psql --help` tells me that I'm the default user (I'm the administrator of
> the machine) but after Googling for hours I can't create a role or create a
> database. I've followed the instructions in the PostgreSQL manual for this
> version of pgsql to the letter but no go.

psql defaultdb 		(seems to be defaultdb from what you wrote)
defaultdb=# CREATE USER myuser WITH PASSWORD 'icanconnect';

Or from the bash command line:
bash-3.2$ su - postgres
bash-3.2$ createuser myuser -W

-- 
X-rated movies are all alike ... the only thing they leave to the
imagination is the plot.

In response to

Responses

pgsql-novice by date

Next:From: Phil DobbinDate: 2011-11-18 15:54:36
Subject: Re: Real novice question: Roles
Previous:From: Phil DobbinDate: 2011-11-18 15:07:59
Subject: Real novice question: Roles

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