Thread: Getting this error when I use createdb

Getting this error when I use createdb

From
Alexandre Sebrao
Date:
I getting this error when I tried to create a database called cservice:

[alexandre@localhost alexandre] createdb cservice
psql: FATAL 1:  SetUserId> user 'alexandre' is not in 'pg_shadow'
createdb: database creating failed

This pgsql is already insert on my Linux Mandrake 8.0
What can I do to make it work... plz I need this help!

Re: Getting this error when I use createdb

From
Darren Ferguson
Date:
You do not have a database user named alexandre so the system will not
allow you to create a database using a user who does not exist.

Either create the user or createdb using a different user hich you have
already entered into the system

Usage:
  createdb [options] dbname [description]

Options:
  -D, --location=PATH             Alternative place to store the database
  -T, --template=TEMPLATE         Template database to copy
  -E, --encoding=ENCODING         Multibyte encoding for the database
  -h, --host=HOSTNAME             Database server host
  -p, --port=PORT                 Database server port
  -U, --username=USERNAME         Username to connect as
  -W, --password                  Prompt for password
  -e, --echo                      Show the query being sent to the backend
  -q, --quiet                     Don't write any messages

By default, a database with the same name as the current user is created.

Read the bottom line starting By default

If you need to change the user then use the -U parameter

HTH

Darren Ferguson

On Fri, 21 Jun 2002, Alexandre Sebrao wrote:

> I getting this error when I tried to create a database called cservice:
>
> [alexandre@localhost alexandre] createdb cservice
> psql: FATAL 1:  SetUserId> user 'alexandre' is not in 'pg_shadow'
> createdb: database creating failed
>
> This pgsql is already insert on my Linux Mandrake 8.0
> What can I do to make it work... plz I need this help!
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

--
Darren Ferguson