Ubuntu – Can’t connect to postgresql on local machine using IP + pgadmin

postgresqlUbuntu

On Ubuntu 12.04, I've installed pg and pgadmin.

I can access localhost/phppgadmin using the browser.

I also can do this: IP/phppgadmin.

However, I cannot use the IP number to connect to pg using pgadmin.

It reports that the server isn't listening.

Any ideas on this?

Best Answer

PostgreSQL by default listen only on local UNIX sockect. To enable TCP/IP endpoint uncomment in your postgresql.conf file:

listen_addresses = '*'

Where '*' - listen on all interfaces. Or put your IP number here if you want listen on specific IP only.

http://www.postgresql.org/docs/9.1/static/runtime-config-connection.html#GUC-LISTEN-ADDRESSES