You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ sudo -u postgres psql
CREATE DATABASE <dbname>;
CREATE USER <username> WITH ENCRYPTED PASSWORD '<password>';
GRANT ALL PRIVILEGES ON DATABASE <dbname> TO <username>;
Create user:
sudo -u postgres createuser <username>
Create Database
sudo -u postgres createdb <dbname>
Give password to the user:
$ sudo -u postgres psql
psql=# ALTER USER <username> WITH ENCRYPTED PASSWORD '<password>';
Grant privileges on database:
psql=# GRANT ALL PRIVILEGES ON DATABASE <dbname> TO <username>;