[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
Can answer this precisely 'cos have just done the same When connecting to the postgres server you need to have configured the configuration files (pg_hba.conf and postgresql.conf) to allow local (or not so local connection). You may or may not (depending on your network/local design philosophy) need to set up users who can access the database. Database users need setting up within the Postgres database and have their own username and password which I would suggest mapping to a Linux user. When you start a postgres job - probably using psql, you specify the database and username you wish to use - the default for the username is, unless you have altered it, to use the login username. Thus, I would suggest you avoid using root as a user anyway, but use an alternative user and set up the conf files appropriately. Cheers David ----- Original Message ----- From: "dave morgan" <morgad@xxxxxxxxxxxxx> To: <list@xxxxxxxxxxxx> Sent: Sunday, March 20, 2005 1:04 PM Subject: [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 -- 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