Skip to main content

Connecting to Postgres

Connecting W/ Psql

Get All options

psql --help
psql -h localhost -U username -p 5432 -d db

OUT

Password for user username: 
psql (16.4 (Ubuntu 16.4-0ubuntu0.24.04.2), server 16.2 (Debian 16.2-1.pgdg120+2))
Type "help" for help.

db=#

Connection string

postgres://username:password@localhost:5432/db?sslmode=disable