From: | "mathan" <mathan(at)hotpop(dot)com> |
---|---|
To: | <jennliu(at)MIT(dot)EDU>, <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: starting up database server + user postgres |
Date: | 2003-09-02 03:47:39 |
Message-ID: | 013a01c37104$f914e590$250110ac@MAMCO |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
> I'm a novice for using Postgres and Linux - any help or suggestions would
be really appreciated, thanks!!! I'm having trouble logging on as the
postgres user. I wanted to
> create a database, so I tried...
>
> root# /usr/local/pgsql/bin/createdb test
> psql: could not connect to server: No such file or directory
> Is the server running locally and accepting
> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
> createdb: database creation failed
>
> (so i thought i probably needed to logon as postgres, so i tried...)
> root# su - postgres
> su: user postgres does not exist
>
> root# adduser postgres
> adduser: group postgres exists - if you want to add this user to that
group, use -g.
>
> root# chown postgres /usr/local/pgsql/data
> chown: `postgres': invalid user
>
>
> I'm a little stuck....can anybody help? thanks so much!
Just run the following commands
# useradd postgres
# rm -rf /usr/local/pgsql/data
# mkdir /usr/local/pgsql/data
# chown postgres /usr/local/pgsql/data
#su - postgres
$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
$ /usr/local/pgsql/bin/postmaster &
It will start the postgresql daemon
$ /usr/local/pgsql/bin/createdb test
$/usr/local/pgsql/bin/psql test
Then you enter into the databare test
thanks
--mathan
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 6/18/2003
From | Date | Subject | |
---|---|---|---|
Next Message | Cody Phanekham | 2003-09-02 04:35:01 | Restoring the database |
Previous Message | Tom Lane | 2003-09-01 21:07:37 | Re: starting up database server + user postgres |