Skip to content

Instantly share code, notes, and snippets.

@rek
Last active August 6, 2016 11:56
Show Gist options
  • Save rek/e12a5e3aa6842f4bf6133f91f5662e55 to your computer and use it in GitHub Desktop.
Save rek/e12a5e3aa6842f4bf6133f91f5662e55 to your computer and use it in GitHub Desktop.
Start:
sudo su - postgres
psql
By default, postgres tries to connect to a database with the same name as your user.
To prevent this default behaviour, just specify user and database:
psql -U Username DatabaseName
To check if running:
sudo service postgresql status
Create DB: createdb
Create user: createuser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment