0
Q:

How do I add a user to a postgres database? cli

# https://www.postgresql.org/docs/8.0/sql-createuser.html
CREATE USER <username> WITH PASSWORD '<password>' VALID UNTIL '<date here>';
2
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser;
0
psql=# grant all privileges on database <dbname> to <username>
0

New to Communities?

Join the community