sudo systemctl status postgresql
psql
:psql -h host_name -p port_number -U user_name -W database_name
/var/log/postgresql/
on Linux.pg_hba.conf
file for appropriate host
entries that match your client's IP address or subnet.postgresql.conf
file is set to listen on the correct interface:listen_addresses = '*'
allows listening on all interfaces, or set it to a specific IP address.telnet
or nc
to check connectivity:telnet host_name 5432
nc -zv host_name 5432
sudo systemctl restart postgresql
(Perfect for DevOps & SREs)
(Perfect for DevOps & SREs)