Search Postgresql Archives

Re: Problem. createdb: could not connect to database postgres: could not connect to server: No such file or directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 19, 2008 at 10:14:00AM +0530, Jaisen N.D. wrote:
> Hi., Sorry for my late reply, I wasn't on desk for last few days. My goal is
> to set up a spatial database, with postgresql 8.1. I removed the postgresql
> installation using apt-get --purge remove. and removed the
> var/lib/postgresql/data directory. And then reinstalled it again. The result
> I got is here:-

Why are you creating a database here:
> --------------------------------------
> I created data folder again. But When I tried to create a test database, I
> couldn't. Here is the steps I followed:-
> --------------------------------------
> localhost:/home/user# adduser postgres
> adduser: The user `postgres' already exists.
> localhost:/home/user# mkdir /var/lib/postgresql/data
> localhost:/home/user# chown postgres /var/lib/postgresql/data
> localhost:/home/user# su - postgres

When it told you it already created one and it's already running.
> Creating new cluster (configuration: /etc/postgresql/8.1/main, data:
> /var/lib/po stgresql/8.1/main)...

<snip>

> Configuring postgresql.conf to use port 5432...
> Starting PostgreSQL 8.1 database server: main.

Delete directory just created and do this as root:

su - postgres
createuser <your username>
# Say you wanto to be superuser
createdb <database name>

> Where is the problem??
> The logfile in home folder of postgres user is as follows:-
> --------------------------------------
>  LOG:  could not bind IPv4 socket: Address already in use
> HINT:  Is another postmaster already running on port 5432? If not, wait a
> few seconds and retry.

Use the server already running, instead of making another one.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux