View previous topic :: View next topic |
Author |
Message |
misterLu Guru
Joined: 14 Sep 2003 Posts: 430 Location: Poland
|
Posted: Tue Oct 05, 2004 8:19 pm Post subject: Postgresql createuser: could not connect to database |
|
|
I have new Postgresql on my destkop. I can't connect to it.
postgres is started:
Code: |
# ps aux | grep post
root 4178 0.0 0.1 4212 628 pts/0 S+ 22:11 0:00 tail -f /var/lib/postgresql/data/postgresql.log
postgres 4302 0.0 0.4 27520 2252 pts/2 S 22:11 0:00 /usr/bin/postmaster -d 5 -N 128 -B 2048 -D /var/lib/postgresql/data
postgres 4304 0.0 0.3 9396 1940 pts/2 S 22:11 0:00 postgres: stats buffer process
postgres 4307 0.0 0.3 8404 1996 pts/2 S 22:11 0:00 postgres: stats collector process
|
but (as a root) I cannot create nor user neither database:
Code: |
# createuser x
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y
createuser: could not connect to database template1: FATAL: user "root" does not exist
# createdb xxx
createdb: could not connect to database template1: FATAL: user "root" does not exist
|
How can I fix it ? |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20583
|
Posted: Tue Oct 05, 2004 8:23 pm Post subject: |
|
|
Moved from Portage & Programming. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
wangotango n00b
Joined: 26 Aug 2003 Posts: 1 Location: Alexandria, Virginia
|
Posted: Tue Nov 02, 2004 2:34 am Post subject: |
|
|
Start the database, su - to root, su to postgres (no password needed), run createuser command as postgres user. |
|
Back to top |
|
|
|