D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] postresql-101 question

 

I have just installed postresql on my Debian(stable) box
and nothing works ... any pointers on what I need to check?

postgreql is running -
webserver:/var/lib# /etc/init.d/postgreql restart
Restarting PostgreSQL database: postmaster
Stopped /usr/lib/postgresql/bin/postmaster (pid 8344 8346 8348).
Starting PostgreSQL postmaster.
postmaster successfully started

but I cannot even list current databases -
webserver:/var/lib# psql -l
psql: FATAL 1:  user "root" does not exist

so try to add user root -
webserver:/var/lib# createuser
Enter name of user to add: root
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
psql: FATAL 1:  user "root" does not exist
createuser: creation of user "root" failed

or even try to add a database -
webserver:/var/lib# createdb
psql: FATAL 1:  user "root" does not exist
createdb: database creation failed

and there is something in the database area -
webserver:/var/lib/postgres# ls -lR
.:
total 4
drwx------    6 postgres postgres     4096 Mar 20 12:35 data

./data:
total 28
-rw-------    1 postgres postgres        4 Mar 19 18:08 PG_VERSION
drwx------    4 postgres postgres     4096 Mar 19 18:08 base
drwx------    2 postgres postgres     4096 Mar 20 12:37 global
drwx------    2 postgres postgres     4096 Mar 19 18:08 pg_clog
lrwxrwxrwx    1 postgres postgres       27 Mar 19 18:08 pg_hba.conf ->
/etc/postgresql/pg_hba.conf
lrwxrwxrwx    1 postgres postgres       29 Mar 19 18:08 pg_ident.conf
-> /etc/postgresql/pg_ident.conf
drwx------    2 postgres postgres     4096 Mar 19 18:08 pg_xlog
lrwxrwxrwx    1 postgres postgres       31 Mar 19 18:08
postgresql.conf -> /etc/postgresql/postgresql.conf
-rw-------    1 postgres postgres       35 Mar 20 12:35
postmaster.opts
-rw-------    1 postgres postgres       49 Mar 20 12:35 postmaster.pid

./data/base:
total 8
drwx------    2 postgres postgres     4096 Mar 20 12:23 1
drwx------    2 postgres postgres     4096 Mar 19 18:08 16555

[subdirectories snipped]

any ideas?
best regards
Dave 


-- 
http://www.morgad.no-ip.info/index.html    gpg:0x64B5E037 
Distributed Proofreaders: http://www.pgdp.net
The NTP server pool http://www.pool.ntp.org

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe. FAQ: www.dcglug.org.uk/linux_adm/list-faq.html