Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group