Connect to Remote PostgreSQL Database
Jump to navigation
Jump to search
Purpose
This topic describes how to use the psql command to connect to PostgreSQL database from Linux terminal.
Import the Dump File
Just run below command and change it with the database value.
[root@gejoreuy ~]# psql -U username -h hostname -p port dbname
Note :
- username: The username to log on to PostgreSQL database.
- hostname: The hostname of the PostgreSQL database.
- port: The port number of the PostgreSQL database.
- dbname: The name of the database.