Last active
June 10, 2019 09:40
-
-
Save cedricbonhomme/8075bc20e527a43317fb47c034bc553f to your computer and use it in GitHub Desktop.
Creation of a PostgreSQL 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
sudo -u postgres createuser <username> | |
sudo -u postgres createdb <database> | |
sudo -u postgres psql | |
psql (11.2 (Ubuntu 11.2-1)) | |
Type "help" for help. | |
postgres=# alter user <username> with encrypted password '<password>'; | |
ALTER ROLE | |
postgres=# grant all privileges on database <database> to <username>; | |
GRANT | |
postgres=# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment