Hello

I remove my old postgres database server 7.4 and install new 8.1. I think that post 8.1 uses port number 5433. When I run my site again, I have this error:

=====

The PostgreSQL error was: 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?.

=====
Now I want to go to the setup page that allow me to set port number, but I cannot find out this page. When I run
http://mysite.com/install.php, I got a page with this error:

====
failure to connect to your PostgreSQL database server. PostgreSQL reports the following message: Connection failed. See log file for failure reason.

* Are you sure you have the correct username and password?
* Are you sure that you have typed the correct database hostname?
* Are you sure that the database server is running?
* Are you sure you typed the correct database name?

====

Could you please tell me how to change port number
Many thanks
sho

Comments

jpulles’s picture

Hi John,

I just had this same problem and found that the port number can be added to the postgresql connection string, as in pgsql://username:password@localhost:port/databasename.