Skip to content

Instantly share code, notes, and snippets.

@mhmdAljefri
Last active August 5, 2018 08:09
Show Gist options
  • Save mhmdAljefri/7b27c07d5e635e4eda26de4e4292d58e to your computer and use it in GitHub Desktop.
Save mhmdAljefri/7b27c07d5e635e4eda26de4e4292d58e to your computer and use it in GitHub Desktop.
# instructio of first using postger
# OPEN CLI AS ROOT
sudo -u postgres psql
#command above open cli as super admin
#CREATE USER
sudo -u postgres createuser <username>
#CREATE DATABSAE
sudo -u postgres createdb <dbname>
/**
*
*
*/
/**
*AFTER OPEN POSTGER CLI
*/
#GIVE THE USER PASSWORD
alter user <username> with encrypted password '<password>';
#GRANT PREVELIGA OF DATABASE TO USER
grant all privileges on database <dbname> to <username> ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment