Thursday, January 28, 2016

connect to host postgresql from vagrant guest

user@host:~$ sudo -i
root@host:~$ echo "listen_addresses = '*'" >> /etc/postgresql/9.5/main/postgresql.conf
root@host:~$ echo "host    all             all             0.0.0.0/0            md5" >> /etc/postgresql/9.5/main/pg_hba.conf

root@host:~$ /etc/init.d/postgresql restart


connect to host from guest
user@host:~$ vagrant ssh
vagrant@guest:~$ psql -h 192.168.33.1



2 comments:

Unknown said...
This comment has been removed by the author.
Unknown said...

Thanks for sharing such a useful information with us. Ruby on Rails acts as an open source and a rapid type of web development framework that works with a continuous goal to maximize both productivity and efficiency of developers. We have an experts team of Ruby on Rails Developers in india,.