简体   繁体   中英

Remote access to postgresql server not getting configured

I wanted to configure postgresql server on other terminal. so I accessed that terminal using ssh service.It worked successfully. On my terminal I have installed ubuntu 16.04 and other terminal has ubuntu server 16.04 installed on it. So I wanted to install postgresql 9.6 on other terminal.I used command:

$ sudo apt-get install postgresql-9.6

as we can see that it installed successfully as port is set for localhost access.

tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN

I wanted to configure remote access to the server made changes to the postgresql.conf file and pg_hba.conf file as given in following link:

https://blog.bigbinary.com/2016/01/23/configure-postgresql-to-allow-remote-connection.html

then I restarted the server using following command:

$ sudo service postgresql restart

still it shows that it is set to localhost at port 5432 as given below:

$tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN

I tried many times but still got same result. I don't know what is going wrong. Please help

ok I got the answer. Just had to uncomment the "listen_addresses = '*'". So stupid of me.thank you guys for your valuable time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM