dwyl / learn-phoenix

:fire: Phoenix is the web framework without compromise on speed, reliability or maintainability! Don't settle for less. :rocket:
649 stars 45 forks source link

Database errors with `mix ecto.create` or `mix phoenix.server` #53

Closed Jbarget closed 7 years ago

Jbarget commented 7 years ago

Postgres server not running

If you run mix ecto.create and see this:

screen shot 2017-03-05 at 18 11 40

or if you run mix phoenix.server and see this:

screen shot 2017-03-05 at 18 11 23

then it means your postgres server isn't running. You can fix this by running postgres -D /usr/local/var/postgres/

Invalid username and password

If you see an error like this:

screen shot 2017-03-05 at 17 45 52

it is likely that the username and password towards the bottom of your config/dev.exs dont match your local machine's postgres username and password.

If you know your postgress username and password then you'll need to change the values for those fields in config/dev.exs. If you don't know your username and password for postgres you will need to reset them. Look here for details