sql - How to connect my local postgresql with my local ip address -


my question is, install postgresql in mac, want connect postgresql local ip address.

for example, local ip address is: 10.xxx.xxx.xxx, want command aspsql -u username -d dbname -h 10.xxx.xxx.xxx instand of command psql -u username -d dbname -h 127.0.0.1.

i has added ip address pg_hba.conf, , changed listen_address in postgresql.conf listen_address = '*', not worked.

thanks answer.

add local ip in /etc/hosts file , try again. below:

127.0.0.1   localhost 10.xxx.xxx.xxx  localhost 

Comments

Popular posts from this blog

python - Best design pattern for collection of objects -

go - serving up pdfs using golang -

python - django admin: changing the way a field (w/ relationship to another model) is submitted on a form so that it can be submitted multiple times -