Created
June 17, 2020 13:16
-
-
Save andrewp-as-is/0b7f73f6d3ea73b5179fb0200db3fae7 to your computer and use it in GitHub Desktop.
PostgreSQL user
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
--sudo -u postgres psql -p 5432 | |
CREATE USER username WITH PASSWORD 'secret'; | |
ALTER USER username WITH PASSWORD 'secret'; | |
DROP USER username; | |
CREATE DATABASE dbname WITH OWNER=username; | |
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