Created
October 8, 2019 13:47
-
-
Save lbbedendo/53078df4d17f04f34cfd5c0f7793c60a to your computer and use it in GitHub Desktop.
Creating user, database and adding access on PostgreSQL
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 | |
postgres=# create database mydb; | |
postgres=# create user myuser with encrypted password 'mypass'; | |
postgres=# grant all privileges on database mydb to myuser; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment