Question

I have an Ubuntu Server with Postgresql server on Virtualbox machine (which runs on local machine), and Pgadmin3 on local machine. Now how can I connect with Pgadmin3 to a database on Virtualbox? I am getting

"Server doesn't listen"

Postgres is actually running inside Virtualbox.

Was it helpful?

Solution

Found this out. To make it work, i did:

1) Edited file /etc/postgresql/9.1/main/postgresql.conf , uncommented and edited one line to contain:

listen_addresses = '10.10.4.14,localhost'

Where 10.10.4.14 is address used to access server on virtualbox.

2) Edited file /etc/postgresql/9.1/main/pg_hba.conf , added one line at the end:

host     all             all             10.10.4.14/24           md5

Note file path in your case might be different if your Postgres version is not the same as mine, or another linux distribution might place those files in other locations.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top