LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problems with PostgreSQL 8.3 on Ubuntu Server 8.04. (https://www.linuxquestions.org/questions/linux-software-2/problems-with-postgresql-8-3-on-ubuntu-server-8-04-a-747770/)

mrotsliah 08-15-2009 11:11 AM

Problems with PostgreSQL 8.3 on Ubuntu Server 8.04.
 
I have never worked with database stuff. I need to set up a database for Moodle. I know I have PostgreSQL 8.3 installed on my computer. I try to create a new database, and it responds

createdb: could not connect to database postgres: FATAL: Ident authentication failed for user "bob"

or

createdb: could not connect to database postgres: FATAL: the database system is shutting down

I try to create a new user by typing

sudo -u postgres createuser -D -A -P myuser

and it responds

createuser: could not connect to database postgres: FATAL: the database system is shutting down


I don't know what I am doing wrong. My copy of PostgreSQL must not like me. :(

I would appreciate any help. Thank you.

Tinkster 08-16-2009 09:09 PM

What happens is you 'sudo su - postgres'
and run psql (assuming that postgres is still running; if it isn't,
restart it using [as root, or using sudo] '/etc/init.d/postgresql-8.3 start')?


Do you see anything in postgres' log (not sure where it lives in debian/
ubuntu) pertaining to the crash?


Chances are also that Ubunut doesn't create any database by default (and
postgres' default is to connect to a database going by the same name as
the user when invoked). Try a 'createdb' as the postgres user to begin with.






Cheers,
Tink


All times are GMT -5. The time now is 01:40 PM.