Skip to content

Instantly share code, notes, and snippets.

@lbbedendo
Created October 8, 2019 13:47
Show Gist options
  • Save lbbedendo/53078df4d17f04f34cfd5c0f7793c60a to your computer and use it in GitHub Desktop.
Save lbbedendo/53078df4d17f04f34cfd5c0f7793c60a to your computer and use it in GitHub Desktop.
Creating user, database and adding access on PostgreSQL
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