Advertisement
Guest User

Untitled

a guest
Jul 10th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. # How to create new database and new user with password on PostgreSQL (the easiest way)
  2.  
  3. First, create db:
  4. ```
  5. $ createdb avocado
  6. ```
  7.  
  8. Then, create user:
  9. ```
  10. $ createuser avocado
  11. ```
  12.  
  13. Then, login to psql with admin user (usually `postgres`) and change password of new user:
  14. ```
  15. $ sudo -u postgres psql
  16. psql (9.6.2, server 9.4.4)
  17. Type "help" for help.
  18.  
  19. postgres=# \password avocado
  20. Enter new password:
  21. Enter it again:
  22. postgres=# \q
  23. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement