Skip to main content

Setup PostgreSQL

Connect

sudo -u postgres psql

Create DB

CREATE DATABASE name;

Create user

CREATE USER user WITH ENCRYPTED PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE name TO user;
info

Change the database before configuring the schema:

\c <db>
GRANT ALL ON SCHEMA public TO user;