Forum OpenACS Q&A: Pgadmin III

Collapse
Posted by Boris Kruvshenko on
I´m trying to watch postgres databases with pgadmin instead of psql.

Postgresql is in a machine with ip 192.168.1.3, and pgadmin in a machine with ip 192.168.1.2.

By default, the port given by pgadmin is 5432.

When I try to connect I get next message:

"Error connecting to the server Connection refused.
Is the server runnning on host "192.168.1.3" and accepting TCP/IP connections on port 5432?"

I don´t know if the port is correct, or if I have to config anything on the postgres or ........

Any idea ???

Thx.

Collapse
2: Re: Pgadmin III (response to 1)
Posted by Nima Mazloumi on
you need to edit

/pgdata/<service0>/pg_hba.conf

Add add these infos:
Server-Konfiguration
Hostname    where_postgress_is
Port        5432
Database    your_db_name
Username    your_user_name

Collapse
3: Re: Pgadmin III (response to 1)
Posted by Patrick Giagnocavo on
What is happening is that the Postgres server is listening on a local unix socket (sometimes called a domain socket), rather than on a network-accessible TCP/IP socket.  Thus, you cannot connect to the server over TCP/IP .

Be sure that you start your PG server process with -i , so that it listens on both TCP/IP and the local unix socket.

Collapse
4: Re: Pgadmin III (response to 3)
Posted by Boris Kruvshenko on
Hi Patrick, I have postgres 7.4.5, and it starts the postgres with pg_ctl as:

su - postgres -c "/usr/local/pgsql/bin/pg_ctl start -D '/usr/local/pgsql/data' -s -l /usr/local/pgsql/data/server.log"

but it doesn´t recognice the -i option... so ????

Collapse
5: Re: Pgadmin III (response to 4)
Posted by Steve Manning on
No offence Patrick but the -i option is the old way of doing it ;o) now you just change a setting.

Look for the postgresql.conf file in the pg data directory and inside there change the line tcpip_socket = true.

  - Steve

Collapse
6: Re: Pgadmin III (response to 5)
Posted by Boris Kruvshenko on
Thx Steve, it works changing the postgresql.conf.
Collapse
7: Re: Pgadmin III (response to 1)
Posted by Jun Yamog on
Please also take additional security measures now that you are allowing pg traffic across tcp/ip.
Collapse
8: Re: Pgadmin III (response to 7)
Posted by Boris Kruvshenko on
Hi Jun... what kind or which security messures do you recommend me?.. SSL or something like that?
Collapse
9: Re: Pgadmin III (response to 8)
Posted by Rocco Siffredi on
Hi Boris Izaguirre :

SHA-1 esta operativo jurjurjur