Answers for "postgres setup new user"

50

create db user postgres

sudo -u postgres psql
postgres=# create database mydb;
postgres=# create user myuser with encrypted password 'mypass';
postgres=# grant all privileges on database mydb to myuser;
Posted by: Guest on September-01-2020
0

create postgres user windows

# in the terminal (not inside psql)
createuser -P --interactive ExampleUser

# Inside psql (using SQL)
CREATE USER john WITH PASSWORD 'mypass' CREATEDB;
Posted by: Guest on January-23-2022

Browse Popular Code Answers by Language