Guest User

Untitled

a guest
Jan 1st, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. FATAL: role "postgres" does not exist
  2.  
  3. createuser -s -r postgres
  4.  
  5. Ex: createuser -s -U $USER
  6. enter your required role name: postgres
  7. enter password for your the user:
  8.  
  9. psql -U 'your_database_name'
  10.  
  11. $ sudo su
  12. # su postgres
  13. # createuser -s --username=postgres MYUSERNAME
  14.  
  15. sovanlandy=# CREATE ROLE postgres LOGIN;
  16.  
  17. sovanlandy=# ALTER ROLE postgres LOGIN;
  18.  
  19. $createdb myapp_development
  20.  
  21. default: &default
  22. adapter: postgresql
  23. encoding: unicode
  24. pool: 5
  25. host: <%= ENV.fetch("DATABASE_HOST") %>
  26. password: <%= ENV.fetch("DATABASE_PASSWORD") %>
  27. port: 5432
  28.  
  29. development:
  30. <<: *default
  31. database: exactpos_development
  32.  
  33. test:
  34. <<: *default
  35. database: exactpos_test
  36.  
  37. production:
  38. <<: *default
  39. database: exactpos_production
  40. host: <%= ENV.fetch("DATABASE_HOST") %>
  41. username: <%= ENV.fetch("DATABASE_USER") %>
Add Comment
Please, Sign In to add comment