Access PostgreSQL from the outside world
Writing by shivdev on Tuesday, 7 of September , 2010 at 4:07 pm
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 = ‘*’
- 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
- host all all 10.4.5.6/32 trust
- Note 10.4.5.6 is the IP address of the client you want to connect from
- Restart pgsql process /etc/init.d/postgresql restart
Leave a comment
Category: Tips and Tricks
- Add this post to
- Del.icio.us -
- Digg -
- -
- Tweet -
-
-
No Comments
No comments yet.
Leave a comment
You must be logged in to post a comment.