Thread: connecting to postgresql

connecting to postgresql

From
Sun H Chi
Date:
Hello,
 
I installed EMS postgres Admin (win) and I'm trying to connnect directly to the database (linux). I have specfied the host ip, default port 5432, and username(postgres), no password.  The server refused connection...I suspect it is because I have not set the configuration parameters for tcpip_socket = true in postgresql.conf.  The problem is...I can't locate this file anywhere on the server. 
This is the file/directory listing from the server.
 
/FileX/postgresql
-rw-------    1 postgres postgres     8192 Oct 29  2002 pg_shadow
-rw-rw-rw-    1 postgres postgres       52 Oct 29  2002 pg_pwd
-rw-------    1 postgres postgres        0 Oct 29  2002 pg_group
-r--------    1 postgres postgres     3407 Oct 29  2002 pg_geqo.sample
-rw-------    1 postgres postgres        4 Oct 29  2002 PG_VERSION
drwx------    4 postgres postgres     4096 Oct 29  2002 base
-rw-------    1 postgres postgres     8192 Oct 30  2002 pg_database
-rw-r--r--    1 root     root         5254 Oct 30  2002 pg_hba.conf.old
-rw-r--r--    1 root     root         5254 Oct 30  2002 pg_hba.conf.new
-rw-r--r--    1 root     root         5251 Nov 11  2002 pg_hba.conf
drwxr-xr-x    3 postgres postgres     4096 Nov 11  2002 .
-rw-------    1 postgres postgres     8192 Sep 16 03:00 pg_variable
-rw-------    1 postgres postgres    49152 Sep 16 03:00 pg_log
drwxr-xr-x   13 root     root         4096 Sep 16 07:24 .
 
What do I need to do to connect the windows client to the database?
 
Thanks!!

Re: connecting to postgresql

From
Josh Berkus
Date:
Sun,

> I installed EMS postgres Admin (win) and I'm trying to connnect directly to
> the database (linux). I have specfied the host ip, default port 5432, and
> username(postgres), no password.  The server refused connection...I suspect
> it is because I have not set the configuration parameters for tcpip_socket
> = true in postgresql.conf.  The problem is...I can't locate this file
> anywhere on the server.

Have you run initdb on the server?  I suspect that you haven't.   Please see:
http://www.postgresql.org/docs/current/static/app-initdb.html

--
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco

Re: connecting to postgresql

From
Lars Haugseth
Date:
* Sun H Chi:
| I installed EMS postgres Admin (win) and I'm trying to connnect directly to
| the database (linux). I have specfied the host ip, default port 5432, and
| username(postgres), no password.  The server refused connection...I suspect
| it is because I have not set the configuration parameters for tcpip_socket
| = true in postgresql.conf.  The problem is...I can't locate this file
| anywhere on the server.  

What Linux distribution and what version of PostgreSQL is running on the
server? Is PostgreSQL installed from source or from a binary distribution?

Try this:

 $ locate postgresql.conf

If all that gives you is an error message, try this (you may need to be root):

 $ find /etc -name "postgresql.conf*"

--
Lars Haugseth