Postgres Create User Example

To create a PostgreSQL user, follow these steps:

$ sudo -u postgres psqlpostgres=# create user myuser with encrypted password 'mypass';postgres=# grant all privileges on database mydb to myuser;postgres=# q