useful-stuff

A place to keep all those useful code snippets, links etc

View project on GitHub

Connecting to Postgres

Some notes to connecting to a postgres database.

On the server

sudo -u postgres psql

note, must connect under the postgres user account, or create a new role with matching use account

Remotely

psql -U <user> -h  <host> <database>

# for example
psql -U corda -h  ec2-35-176-144-236.eu-west-2.compute.amazonaws.com corda    

See also