Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 6230B476291 for ; Tue, 2 Jul 2002 14:34:46 -0400 (EDT) Mailbox-Line: From mt@open2web.com Tue Jul 2 14:34:46 2002 Received: from tomts24-srv.bellnexxia.net (tomts24.bellnexxia.net [209.226.175.187]) by postgresql.org (Postfix) with ESMTP id 126DF476245 for ; Tue, 2 Jul 2002 14:34:42 -0400 (EDT) Received: from nino ([65.92.163.219]) by tomts24-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with SMTP id <20020702183446.ESXU21888.tomts24-srv.bellnexxia.net@nino>; Tue, 2 Jul 2002 14:34:46 -0400 Date: Tue, 2 Jul 2002 14:27:16 -0400 From: Mark Tessier To: "Nick Fankhauser" Cc: pgsql-admin@postgresql.org Subject: Re: db connection fails Message-Id: <20020702142716.689d3948.mt@open2web.com> In-Reply-To: References: <20020701152946.347c987c.mt@open2web.com> X-Mailer: Sylpheed version 0.7.8 (GTK+ 1.2.9; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-1.5 required=5.0 tests=IN_REP_TO,SUPERLONG_LINE,RCVD_IN_MULTIHOP_DSBL, RCVD_IN_RFCI,X_RCVD_IN_UNCONFIRMED_DSBL, FUDGE_MULTIHOP_RELAY version=2.30 X-Spam-Level: X-Archive-Number: 200207/37 X-Sequence-Number: 4723 > > > Have you tried doing a network connection with your "apache" user? (su - > > > apache; psql -h localhost group3.) > > > > Yes, I've tried it and get the following: > > > > psql: could not connect to server: Connection refused > > Is the server running on host 192.168.1.2 and accepting > > TCP/IP connections on port 5432? > This is a useful clue. It suggests that your code may be fine and that the > problem is in the networking or authentication setup. (You're using TCP/IP > even if you are on the same box.) > > If you haven't already done so, take a look at your pg_hba.conf file. Info > on how to set it up can be found here: > I've done so and find the following: # TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT local all trust host all 127.0.0.1 255.255.255.255 trust This means I should already be able to connect, although it's stated that "TCP/IP connections are completely disabled unless the server is started with the -i switch or the equivalent configuration parameter is set." So, how do I restart postgres with the -i switch set, and is there a conf file to modify so that postgres starts up with the -i switch set when I turn on the machine? Normally I restart postgres like this /etc/rc.d/init.d/postgresql restart -- Thanks, Mark