FAQ
If you are using a *Nix architechture then look for a file called
"postgresql.conf", in the contents of that file you should see a lines
that look like this:

# - Connection Settings -

listen_addresses = '*' # what IP interface(s) to listen on;
# defaults to localhost, '*' = any
port = 5432
max_connections = 25


Then you can see on which port the database is running.

If you are coming from a fresh installation be sure that the file called
pg_hba.conf has the appropiate setting allowing network connections.



SG Edwards wrote:
Hey guys,

I am trying to connect to a Postgres database using a PHP script but get the
error:

"unable to connect to PostgreSQL server: could not connect to server: Connection
refused;
is the server running on host "localhost" and accepting TCP/IP connections on
port 5432?"

How can I find out which port the Postgres database is using? How can I fix
this?

Many thanks for your help,

Stephen

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
If I have seen further it is by standing on the shoulders of the giants
Isaac Newton

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedApr 6, '05 at 1:48p
activeApr 6, '05 at 2:22p
posts3
users3
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase