Select Page

How to connect to a remote database using PostgreSQL on the command line

On the command line type in the following command

psql -h 196.41.214.143 -U USERNAME -d DATABASE

Replace USERNAME with the username associated to the database and DATABASEwith the database name.

After executing the command it will prompt you for you password

Last Updated On April 07, 2018

Leave a reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.