Skip to content

Instantly share code, notes, and snippets.

@deviousway
Last active October 24, 2017 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deviousway/673ceba664991ee3af74bde0f56a435c to your computer and use it in GitHub Desktop.
Save deviousway/673ceba664991ee3af74bde0f56a435c to your computer and use it in GitHub Desktop.
Pgsql user/db creation
sudo -u postgres psql
sudo -u postgres createuser <username>
sudo -u postgres createdb <dbname>
sudo -u postgres psql
psql=# alter user <username> with encrypted password '<password>';
psql=# grant all privileges on database <dbname> to <username> ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment