0

I have installed postgres via brew. However, after running rake db:create I get error

role 'posgres' does not exist

I can not run psql as role of my user does not exist, which is logical, but I can not login with -u postgres either. Any suggestions, how to create postgres user ?

  • 1
    You seems to have typo! – plaes Sep 30 '16 at 09:48
  • 1
    Possible duplicate of [Rails and PostgreSQL: Role postgres does not exist](http://stackoverflow.com/questions/7863770/rails-and-postgresql-role-postgres-does-not-exist) – plaes Sep 30 '16 at 09:48

1 Answers1

0

It seems like the service is not running / turned on after instal.

Documentation reference: https://www.postgresql.org/docs/current/static/server-start.html

Then perform initdb /[data location]

Then you will need to sudo to postgres user (the service user) to issue commands to the database.

VynlJunkie
  • 1,953
  • 22
  • 26