Last active
June 29, 2019 07:26
-
-
Save bouassaba/fd1f6c2312df78aa9707fc648b2e0d78 to your computer and use it in GitHub Desktop.
Postgres create user and database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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