Quick PostgreSQL user/pass commands

myusername = the username you want to give access to the database
mypassword = the password you want to assign to the user

sudo -u postgres psql
create database mydb;
create user myusername with encrypted password 'mypassword';
grant all privileges on database mydb to myusername;

Done.

Loading

Leave a Reply

Your email address will not be published. Required fields are marked *