Обсуждение: Error connecting database
I'm just trying to run PGSQL and running the test for it. However I get this message, Connection to database 'template1' failed. connectDB() -- connect() failed: No such file or directory Is the postmaster running at 'localhost' and accepting connections on Unix socket '5432'? createdb: database creation failed on i-city. What does that mean? Is it mean that the connect() file is not found under my /usr/local/pgsql/bin? Gan ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com
You don't give many details. I'll assume you're using some variant of
Unix.
[1] Have you checked that the postmaster is running? Try running 'ps
aux' to check that it is.
[2] Have services been enabled for port 5432? Check /etc/services.
I have a pair of lines:
postgres 5432/tcp # POSTGRES
postgres 5432/udp # POSTGRES
[3] Do you have permissions to the given database?
[4] When all else fails, you can try running strace on the process.
(Please read the strace man page).
Hope this helps!
-frank
On Sun, 16 Jan 2000, C.D. Gan wrote:
> I'm just trying to run PGSQL and running the test for it. However I get this
> message,
>
> Connection to database 'template1' failed.
> connectDB() -- connect() failed: No such file or directory
> Is the postmaster running at 'localhost' and accepting connections on Unix
> socket '5432'?
>
> createdb: database creation failed on i-city.
>
> What does that mean? Is it mean that the connect() file is not found under
> my /usr/local/pgsql/bin?
>
> Gan
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
>
> ************
>
>
You might want to check that you have run initdb. Log in as user postgres and type: /usr/local/pgsql/bin/initdb Then check to make sure that postmaster is actually running, as someone else suggested. At 11:21 PM 1/15/00, C.D. Gan wrote: >I'm just trying to run PGSQL and running the test for it. However I get >this message, > >Connection to database 'template1' failed. >connectDB() -- connect() failed: No such file or directory >Is the postmaster running at 'localhost' and accepting connections on Unix >socket '5432'? > >createdb: database creation failed on i-city. > >What does that mean? Is it mean that the connect() file is not found under >my /usr/local/pgsql/bin? > >Gan >______________________________________________________ >Get Your Private, Free Email at http://www.hotmail.com > > >************ >
Also, you might want to check whether you have started the server with
the "-i" option (that's what the Unix Socket message suggests).
Regards,
Holger Klawitter
--
Holger Klawitter +49 (0)251 484 0637
holger@klawitter.de http://www.klawitter.de/