Can't connect PGadmin to virtual Ubuntu server from same machine
Cheers and thanks for reading.
My background - lots of computer and db experience but new to Linux.
Macintosh OS - Mountain Lion 10.8.3 - current
pgadmin 1.16.1 - current
Parallels virtual machine software 8.01 - current
LAMP installed plus added Postresql + DNS + mail server during installation
on Ubuntu Server 12.04
I have stopped Mysql server on the Ubuntu server.
Postgresql is running and the only thing I have config'd different from the default config is to uncomment and enter the following line:
There is another connection config file, pg_hba.conf that I am leaving alone.
I have run Pgadmin on the same Ubuntu virtual server and been able to connect with my PG server and modify the DB with the following info in the server connect dialog:
Host - 127.0.0.1
Port - 5432
Service - I left this blank
Maintenance DB - postgres
Password - the one I assigned after installation
HOWEVER, now I want to connect to PG on the same physical machine in the Mac OS while Ubuntu and PG run in the virtual machine. Can't seem to connect when I run it on the mac and enter the same information or even when selecting other ip addresses. Says that the server is not listening. I can understand that the localhost address I am using probably refers to the mac and not the virtual LAPP server but I don't know what to
do. How can I connect with Pgadmin to PG which is running on its virtual machine. I've spent plenty of time searching and can't figure it out.
BTW, when I try and connect to 127.0.0.1 I get a message instantly - server not listening. When I try any other IP address, Pgadmin hangs for a minute until it times out and then I get the same message - server not listening.
June 16th, 2013, 09:42 PM
From you description it sounds like you have you ubuntu server/postgres running as a virtual machine on your mac. The important thing here is understanding what the ip addresses are of you machines. If you ping 192.168.1.255 in terminal you'll get a list of the ip addresses of everything on network.
You will have to make changes to this file in order to connect from your mac. You have to give permission for a connection from your ip address. eg.. If your mac IP address was 192.168.0.2 then this would be your entry.
Originally Posted by dejswa
host all all 192.168.0.2/32 trust
You will need to issue a reload command to postgres or restart it.
Hope this helps