Question

How to add new user um database postgress cluster

Posted October 19, 2021 106 views
PostgreSQL

Hello how are you?
I need to create a new user for a specific database within my postgres ql cluster, how can I do it, this user will not be able to access the other databases (different clients)

I tried with the basic creation commands, however the authentication error.

create user MYUSER with ENCRYPTED password 'MYPASSWORD';
grant all privileges on DATABASE db to MYUSER;

Already grateful for the attention.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @leobueno1982,

You can see this DOC where it explains how add or delete users or databases to a database cluster.

Hope helps you,
Sergio Turpín