From: Zhiqiang Feng <zf2(at)st-andrews(dot)ac(dot)uk>
To: pgsql-admin(at)postgresql(dot)org
Subject:
Date: 2003-01-20 16:34:40
Message-ID: 4.1.20030120162950.00a70a00@purds.st-andrews.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello all,

I am new to postgreSQL. I have installed postgreSQL 7.1.3-2 on Linux 7.2.
If I login as root (administrator) and change user as postgres I can create
database on /usr/local/pgsql/data which I created and changed its owner as
postgres.

root# mkdir usr/local/pgsql/data
root# chown postgres /usr/local/pgsql/data
root# su postgres
bash-2.3# initdb -D /usr/local/pgsql/data
bash-2.3# postmaster -D /usr/local/pgsql/data > logfile 2 >&1 &
bash-2.3# createdb testdb
bash-2.3# psql testdb

However, when I login as a normal linux user I cannot create database. So
it is a user management problem.

zf2linux# createdb mydb
FATAL 1: user 'zf2linux' does not exist

I have tried to create a user of zf2linux in postgreSQL but the error still
occurs.
If I try to change to postgres from zf1linux it asks for password.

zf2linux# su postgres
password: ******
incorrect password.

My pg_hba.conf is left as the default format:
local all trust
host all 127.0.0.1 255.255.255.255 trust

I must miss something before I allow other users to access the postgreSQL
server and account. Could you please help me with the problem?

Thanks for your attention and will sum.

Geoff

University of St Andrews

Responses

  • Re: at 2003-01-21 03:46:54 from Andrew Biagioni

Browse pgsql-admin by date

  From Date Subject
Next Message Christian Brink 2003-01-20 17:48:33 Re: deadlock problem in Ad serving..
Previous Message Andrew Sullivan 2003-01-20 15:28:07 Re: Installing on Sun machine