1. Access psql from remote
Use psql command from client system. Connect to remote server using IP address 10.10.29.50 and login using vivek username and sales database, enter:
$ psql -h 10.10.29.50 -U vivek -d sales
2. Restart postgresql
systemctl restart postgresql-9.3.service
3. Configure the postgresql service to start on boot.
systemctl enable postgresql-9.6.service
4. List the port status
nmap 10.86.200.93 -p 5432
5. telnet 10.86.200.93 5432
6. Removing
yum erase postgresql96*
7. Reminder
Don't forget to ';' at the end of every statement on psql. Sounds silly but it happens hehe.
for example:
CREATE DATABASE ims;
CREATE USER ims WITH ENCRYPTED PASSWORD ‘ims123’;
ALTER DATABASE ims OWNER TO ims;
浙公网安备 33010602011771号