G⌬RBE/Posts/Setup PostgreSQL/Setup PostgreSQL24 April 2024·Updated: 7 October 2024·43 words·1 min· PostgreSQL SQL DatabaseTable of ContentsConnectCreate DBCreate userConnect #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;