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

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

From: "Jaisen N(dot)D(dot)" <jaisuvyas(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: problem with 8.1: createdb: could not connect to database postgres: could not connect to server: No such file or directory
Date: 2008-04-12 05:21:45
Message-ID: 7db916da0804112221p3a406309w33d4746bfc9003ec@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
Hai, I use Debian Etch. I have a problem with postgresql 8.1. I have
uninstalled the postgresql-8.3, which I was took from debian back ports,
removed its configuration files, and the user postgres also. Then installed
postgresql-8.1. But when I started to create a database, it shows some
message like this..
Here is the output I got:-
-----------------------------------------------------
localhost:/home/user# su - postgres
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".
postgres(at)localhost:~$ /usr/lib/postgresql/8.1/bin/pg_ctl -D
/var/lib/postgresql/data -l logfile start
postmaster starting
postgres(at)localhost:~$ /usr/lib/postgresql/8.1/bin/createdb test
createdb: could not connect to database postgres: could not connect to
server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket
"/var/run/postgresql/.s.PGSQL.5432"?
postgres(at)localhost:~$
-----------------------------------------------------
Why it can't connect to server? How can I resolve it??


-- 
(`'·.¸(`'·.¸  ¸.·'´) ¸.·'´)
«´¨`·*Jaisen.*..´¨`»
(¸.·'´(¸.·'´   `'·.¸)`'·.¸)
¸.·´
(  `·.¸
`·.¸ )
¸.·)´
(.·´
( `v´ )
  `v´

Responses

pgsql-novice by date

Next:From: Derrick BettsDate: 2008-04-13 02:52:38
Subject: ORDER BY Clause
Previous:From: Mark WimerDate: 2008-04-10 13:20:58
Subject: Re: Upload Table Warning Message

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