omotam img

Skip to main content
  1. Posts/

Setup PostgreSQL

··43 words·1 min·

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;

Change the database before configuring the schema:

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