Re: problem with 8.1: createdb: could not connect to database postgres: could not connect to server: No such file or directory - Mailing list pgsql-novice

From Frank Bax
Subject Re: problem with 8.1: createdb: could not connect to database postgres: could not connect to server: No such file or directory
Date
Msg-id 48018B2C.5000900@sympatico.ca
Whole thread Raw
In response to problem with 8.1: createdb: could not connect to database postgres: could not connect to server: No such file or directory  ("Jaisen N.D." <jaisuvyas@gmail.com>)
List pgsql-novice
Jaisen N.D. wrote:
> postgres@localhost:~$ /usr/lib/postgresql/8.1/bin/initdb -D
> /var/lib/postgresql/data
> The files belonging to this database system will be owned by user
> "postgres".
> This user must also own the server process.
>
> The database cluster will be initialized with locale en_IN.
> The default database encoding has accordingly been set to UTF8.
>
> initdb: directory "/var/lib/postgresql/data" exists but is not empty
> If you want to create a new database system, either remove or empty
> the directory "/var/lib/postgresql/data" or run initdb
> with an argument other than "/var/lib/postgresql/data".



You should try one of the two options mentioned in the error message.

The directory you use for -D option on initdb needs to be empty.

pgsql-novice by date:

Previous
From: Frank Bax
Date:
Subject: Re: ORDER BY Clause
Next
From: e-letter
Date:
Subject: convert text file to database