I installed Postgresql in Windows server 2012 Essential on Virtual Machine.

Everything works ok , but when i try to use QGIS Desktop which is on desktop installed to access to Postgresql-data , the connection fails or (Error), known that i use the IP of virtual machine in Host. see image

enter image description here

  • Have you configured the Postgres instances of the pg_hba.conf and postgresql.conf to allow connections from you QGIS machine IP? – maw269 Mar 12 '18 at 21:11
  • Hi, thank you for replying, yes i have already configured the Pg_hba to allow connections? but what do you mean with configuring Postresql.conf? because o thought that configuring pg_hba is enough – IR-GM Mar 12 '18 at 21:16
  • Can you ping the VM from your host machine? what VM software are you using? I use Virtualbox and need to set the network type to 'bridged', then open up the PGSQL ports to accept connections from all clients... although you're using windows, here's the settings in the files you should change: trac.osgeo.org/postgis/wiki/… – DPSSpatial Mar 12 '18 at 22:10
  • im using Vmworkstation Pro – IR-GM Mar 12 '18 at 22:16
  • 1
    Here's some info on bridged mode - you need to make sure your host can talk to your VM before your postgresql connection will work: pubs.vmware.com/ws7_ace26/wwhelp/wwhimpl/js/html/… – DPSSpatial Mar 12 '18 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.