Skip to content

Instantly share code, notes, and snippets.

@bouassaba
Last active June 29, 2019 07:26
Show Gist options
  • Save bouassaba/fd1f6c2312df78aa9707fc648b2e0d78 to your computer and use it in GitHub Desktop.
Save bouassaba/fd1f6c2312df78aa9707fc648b2e0d78 to your computer and use it in GitHub Desktop.
Postgres create user and database
CREATE DATABASE yourdbname;
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass';
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser;
-- Optional, grant superuser privileges
--ALTER USER youruser WITH SUPERUSER;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment