my dog learned polymorphism*
The moose likes Linux / UNIX and the fly likes Fatal error on PostgreSQL & Ubuntu Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Fatal error on PostgreSQL & Ubuntu" Watch "Fatal error on PostgreSQL & Ubuntu" New topic
Author

Fatal error on PostgreSQL & Ubuntu

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi.
I have PostgreSQL8.2 installed on Ubuntu 7.10
I run the following commands:

Then, I tried to create a database:
createdb
But I got this error:
createdb: could not connect to database postgres: FATAL: role "root" does not exist
What is going wrong?
Thanks.
Jeff Rummings
Ranch Hand

Joined: Dec 20, 2007
Posts: 42
You can specify a postgres username with the 'psql -U' flag or you can also try:

psql <dbname> <username>
[ January 11, 2008: Message edited by: Arman Sharif ]
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923

... and you shouldn't use the root-account for running postgres.

You may make system calls from the database, and maybe they could be hidden by a trigger (which worked perfectly yesterday) and so on.


http://home.arcor.de/hirnstrom/bewerbung
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Fatal error on PostgreSQL & Ubuntu