Re: starting up database server + user postgres

Поиск
Список
Период
Сортировка
От mathan
Тема Re: starting up database server + user postgres
Дата
Msg-id 013a01c37104$f914e590$250110ac@MAMCO
обсуждение исходный текст
Ответ на starting up database server + user postgres  (Jennifer Liu <jennliu@MIT.EDU>)
Список 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



В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: starting up database server + user postgres
Следующее
От: "Cody Phanekham"
Дата:
Сообщение: Restoring the database