Search Postgresql Archives

Re: Trying to create DB / user to import some data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sep 26, 2013, at 10:28 PM, mdr <monosij.forums@xxxxxxxxx> wrote:
> 
> create user import_dbms_user with password 'import_dbms';
> create database import_dbms_db;
> grant all privileg

> However when I try to run psql from the command line:
> psql -h localhost -U import_dbms_user -WI enter password when prompted
> Password for user import_dbms_user: 
> psql: FATAL:  database "import_dbms_user" does not exist
> 
> But I get the error as above.

By default, psql will try to use the username as the database name if it is not specified.
Since your database name is different from the user, this does not work.

You could either name both your user and db "import_dbms" and have the default work, or specify the database explicitly with "-d import_dbms_db"

Hope that helps.



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux