Skip to content

Instantly share code, notes, and snippets.

@tyriis
Last active November 2, 2018 20:47
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 tyriis/bc77709fbf9f0f77c72e238c7767dcbc to your computer and use it in GitHub Desktop.
Save tyriis/bc77709fbf9f0f77c72e238c7767dcbc to your computer and use it in GitHub Desktop.
Creating user, database and adding access on PostgreSQL
-- source: https://medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91e
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