pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jaisen N.D. <jaisuvyas@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Problem:- createdb: could not connect to database postgres: could not connect to server: No such file or directory
Date: Sat, 12 Apr 2008 10:57:28 +0530
Message-ID: <7db916da0804112227p5b523629m18c949abf41c1f02@mail.gmail.com> (raw)

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@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@localhost:~$ /usr/lib/postgresql/8.1/bin/pg_ctl -D
/var/lib/postgresql/data -l logfile start
postmaster starting
postgres@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@localhost:~$
-----------------------------------------------------
Why it can't connect to server? How can I resolve it??


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


view thread (4+ messages)  latest in thread

Message-ID: <7db916da0804112227p5b523629m18c949abf41c1f02@mail.gmail.com>
Permalink:  ../7db916da0804112227p5b523629m18c949abf41c1f02@mail.gmail.com/
Also on:    postgresql.org/message-id/7db916da0804112227p5b523629m18c949abf41c1f02@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: jaisuvyas@gmail.com
  Subject: Re: Problem:- createdb: could not connect to database postgres: could not connect to server: No such file or directory
  In-Reply-To: <7db916da0804112227p5b523629m18c949abf41c1f02@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox