Skip to content

Instantly share code, notes, and snippets.

@gnomex
Last active May 11, 2017 02:05
Show Gist options
  • Save gnomex/9331559 to your computer and use it in GitHub Desktop.
Save gnomex/9331559 to your computer and use it in GitHub Desktop.
PostgreSQL First Steps on Linux
  1. sudo -u postgres psql template1
  2. ALTER USER postgres with encrypted password 'xxxxxxx';
  3. sudo subl /etc/postgresql/9.3/main/pg_hba.conf
#And change "peer" to "md5" on the line concerning postgres :
local      all     postgres     peer md5
  1. sudo /etc/init.d/postgresql restart

  2. Try

psql -U postgres
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment