Postgres server not running
If you run mix ecto.create and see this:

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

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:

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
Postgres server not running
If you run
mix ecto.createand see this:or if you run
mix phoenix.serverand see this: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:
it is likely that the
usernameandpasswordtowards the bottom of yourconfig/dev.exsdont match your local machine's postgresusernameandpassword.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