Discussion:
problem logging on with new everyday user
(too old to reply)
John
2012-09-28 14:07:29 UTC
Permalink
I am a newbie and just installed PostgreSQL 8.4 on Ubuntu.  I can get in with my postgres user but when I create an "everyday" user, I can't login with it:

***@sussancws0114:~/downloads$ /opt/PostgreSQL/8.4/bin/psql   -U postgres
Password for user postgres: 
psql (8.4.14)
Type "help" for help.

Cannot read termcap database;
using dumb terminal settings.
postgres=# drop user johnp;
DROP ROLE
postgres=# create user bruno password 'hello';
CREATE ROLE
postgres=# \du
            List of roles
 Role name | Attributes  | Member of 
-----------+-------------+-----------
 bruno     |             | {}
 postgres  | Superuser   | {}
           : Create role   
           : Create DB     

postgres=# \q
***@sussancws0114:~/downloads$ /opt/PostgreSQL/8.4/bin/psql   -U bruno
Password for user bruno: 
psql: FATAL:  database "bruno" does not exist
***@sussancws0114:~/downloads$ 


What am I doing wrong?
Gary Chambers
2012-09-28 14:12:29 UTC
Permalink
John,
Post by John
postgres=# \q
psql: FATAL: database "bruno" does not exist
What am I doing wrong?
Without PGDATABASE set, psql assumes that a database with the same name as
the user connecting exists. Just add the database name to the psql command
and you should be all set.

--
Gary Chambers
--
Sent via pgsql-novice mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
Andreas Kretschmer
2012-09-28 14:16:18 UTC
Permalink
I am a newbie and just installed PostgreSQL 8.4 on Ubuntu. I can get in with
psql (8.4.14)
Type "help" for help.
Cannot read termcap database;
using dumb terminal settings.
postgres=# drop user johnp;
DROP ROLE
postgres=# create user bruno password 'hello';
CREATE ROLE
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+-------------+-----------
bruno | | {}
postgres | Superuser | {}
: Create role
: Create DB
postgres=# \q
psql: FATAL: database "bruno" does not exist
What am I doing wrong?
Read the error-message, you have an user 'bruno', but no database
'bruno'. This should work: psql -U bruno postgres (the last parameter is
the database to connect) or create a own database with 'create database
bruno'.




Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect. (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly." (unknown)
Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
--
Sent via pgsql-novice mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
Loading...