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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: could not connect


  • From: Jean-Michel POURE <jmpoure(at)translationforge(dot)com>
  • To: "Richard Pijnenburg" <richard(dot)mail(at)softhome(dot)net>, pgadmin-support(at)postgresql(dot)org
  • Subject: Re: could not connect
  • Date: Sun, 21 Apr 2002 09:32:28 +0200
  • Message-id: <200204210932(dot)28878(dot)jmpoure(at)translationforge(dot)com>

Le Samedi 20 Avril 2002 17:25, Richard Pijnenburg a écrit :
> I run PostgreSQL version 7.1.3 on my Redhat linux server.
> When I try to connect with pgadmin I get the next error message :
> An error has occured in pgadmin II : frmConnect.cmdConnect_click:
> Number: -2147467258
> Description: Could not connect to server; Could not connect to remote
> socket.
> I've configured the postgresql server so that I can use it true the
> network.
> Can any one help me?

Dear Richard,

For security reasons, TCP_IP socket connexion is not enabled by default in 
PostgreSQL. Try these steps:

1) Open /var/lib/pgsql/data/postgresql.conf
uncomment line "tcpip_socket = true"
This will enable TCPIP sockets for PHP and ODBC connexions.

2) List your Windows client IP in pg_hba.conf
For example for IP 192.168.1.101 :
host        all         192.168.0.101      255.255.255.0          password

You can also replace "password" with "trust" if you whish to connect without 
password direcly from pgAdmin2 (If so, create a user with pgAdmin2 instead of 
step 4. After that, replace "trust" with "passwor", restart PostgreSQL).

3) Restart PostgreSQL
postgres(at)localhost>exit (to return to root user).
root(at)localhost>service postgresql restart
Connect from pgAdmin2. This should work

4) Create an administrator user in pgsql
From your Linux server :
root(at)locahost> su -postgres
postgres(at)localhost> pgsql template1;
# CREATE USER foo PASSWORD 'bar' CREATEDB CREATEUSER;
# \q

5) More information can be found on :
http://www.postgresql.org/idocs <- Beautifull interactive documentation.
http://techdocs.postgresql.org    <- technical docs and tips.

Do not hesitate to come back to us in case of problem.
PostgreSQL is a beautiful database, have fun.

Cheers,
Jean-Michel POURE



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group