Skip to content

Instantly share code, notes, and snippets.

@nqthqn
Created September 10, 2018 17:26
Show Gist options
  • Save nqthqn/e6d4f453bf4bc403dfa6eff49c97c5f2 to your computer and use it in GitHub Desktop.
Save nqthqn/e6d4f453bf4bc403dfa6eff49c97c5f2 to your computer and use it in GitHub Desktop.
Create database with user, postgresql
-- after running psql
CREATE DATABASE yourdbname;
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass';
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment