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

H

How Can We Help?

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

About the author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

About Author

Ian Carnaghan

I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment.

Follow Me