Re: problem with 8.1: createdb: could not connect to database postgres: could not connect to server: No such file or directory

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: PostgreSQL List - Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: problem with 8.1: createdb: could not connect to database postgres: could not connect to server: No such file or directory
Date: 2008-04-13 04:25:16
Message-ID: 48018B2C.5000900@sympatico.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Jaisen N.D. wrote:
> postgres(at)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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message e-letter 2008-04-13 06:58:31 convert text file to database
Previous Message Frank Bax 2008-04-13 04:06:01 Re: ORDER BY Clause