Monday, September 16, 2013

How to create a Database and Grant Permissions

This will show you how to create a Postgresql Database and assign user and grant permissions
  • switch to postgres user 
    • createuser (and follow prompts) 
    • createdb databasename  
Use psql to set password and grant access 

  • postgres=# alter user username with encrypted password 'password'; ALTER ROLE
  • postgres=# grant all privileges on database databasename to username; 
    GRANT

No comments:

Post a Comment