{"id":81,"date":"2010-09-07T16:07:42","date_gmt":"2010-09-07T23:07:42","guid":{"rendered":"http:\/\/shivdev.com\/blog\/2010\/09\/07\/access-postgresql-from-the-outside-world\/"},"modified":"2010-09-07T16:07:42","modified_gmt":"2010-09-07T23:07:42","slug":"access-postgresql-from-the-outside-world","status":"publish","type":"post","link":"http:\/\/shivdev.com\/blog\/2010\/09\/07\/access-postgresql-from-the-outside-world\/","title":{"rendered":"Access PostgreSQL from the outside world"},"content":{"rendered":"<p>Say you want to open up PGSQL so an external client can access it, maybe make some JDBC calls from a different machine etc. you will need to slightly modify some config files<\/p>\n<ul>\n<li><strong>vi \/opt\/local\/pgsql\/data\/postgresql.conf<\/strong><\/li>\n<li>Change <strong>listen_addresses = &#8216;<\/strong>*&#8217;<\/li>\n<li><strong>vi \/opt\/local\/pgsql\/data\/pg_hba.conf<\/strong><\/li>\n<li>Search for something like\n<ul>\n<li><strong>host    all         all         127.0.0.1\/32          md5<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>Add a new line below\n<ul>\n<li><strong>host    all         all         10.4.5.6\/32          trust<\/strong><\/li>\n<li>Note <strong>10.4.5.6<\/strong> is the IP address of the client you want to connect from<\/li>\n<\/ul>\n<\/li>\n<li>Restart pgsql process <strong>\/etc\/init.d\/postgresql restart<\/strong><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Say you want to open up PGSQL so an external client can access it, maybe make some JDBC calls from a different machine etc. you will need to slightly modify some config files vi \/opt\/local\/pgsql\/data\/postgresql.conf Change listen_addresses = &#8216;*&#8217; vi \/opt\/local\/pgsql\/data\/pg_hba.conf Search for something like host all all 127.0.0.1\/32 md5 Add a new line below [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[12],"tags":[],"_links":{"self":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/81"}],"collection":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":0,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"wp:attachment":[{"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/shivdev.com\/blog\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}