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

Re: Doubt with role creation

From: Thom Brown <thom(at)linux(dot)com>
To: Manuel Rivero <trikitrok(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Doubt with role creation
Date: 2010-10-18 14:46:25
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On 18 October 2010 15:39, Manuel Rivero <trikitrok(at)gmail(dot)com> wrote:
> Hi
> First of all, thank you very much for your answer..
> I followed your advise and changed the pg_hba.conf to use of md5 instead of
> ident.
> Now I don't get that error,but I'm afraid I'm getting a different one..
> This is what I did after changing pg_hba.conf:
> postgres=# \q
> Now when I try to to login
> postgres(at)linux-2dqb:> psql -U db_admin -W
> Contraseña para usuario db_admin:
> psql: FATAL:  no existe la base de datos «db_admin»
> Traslated:
> psql: FATAL:  the database «db_admin» does not exist
> Why is it necessary to have a database for a new user?
> I just wanted to have a user different to postgres to work with.

Hi Manuel,

(Please use "Reply to all" when replying as the list should be copied
back in so everyone can see your response.  And try to put your
responses below the message you're replying to.)

By default, psql will attempt to connect to a database with the same
name as a user.  This obviously isn't what you want in this case, so
you need to specify the database name:

psql -U db_admin -W your_database

So the database name appears as the last parameter, or you can use "-d
your_database" instead if it helps make it clearer.


Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

In response to


pgsql-novice by date

Next:From: Manuel RiveroDate: 2010-10-18 14:53:24
Subject: Re: Doubt with role creation
Previous:From: Thom BrownDate: 2010-10-18 09:38:23
Subject: Re: Doubt with role creation

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