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;
Created
July 2, 2021 11:55
-
-
Save hmble/2c10dfded3f0deade5c4bfeb7f3be905 to your computer and use it in GitHub Desktop.
create a user and give access to database
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://medium.com/coding-blocks/creating-user-database-and-adding-access-on-postgresql-8bfcd2f4a91e