Thread: could not connect

could not connect

From
"Richard Pijnenburg"
Date:

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?

 

Re: could not connect

From
Jean-Michel POURE
Date:
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@localhost>exit (to return to root user).
root@localhost>service postgresql restart
Connect from pgAdmin2. This should work

4) Create an administrator user in pgsql
From your Linux server :
root@locahost> su -postgres
postgres@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