File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Fatal error on PostgreSQL & Ubuntu" Watch "Fatal error on PostgreSQL & Ubuntu" New topic

Fatal error on PostgreSQL & Ubuntu

Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3479

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

Then, I tried to create a database:
But I got this error:
createdb: could not connect to database postgres: FATAL: role "root" does not exist
What is going wrong?
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.
I agree. Here's the link:
subject: Fatal error on PostgreSQL & Ubuntu
It's not a secret anymore!