Phoenix - The database for PhoenixRest.Repo couldn't be created: command timed out

I have been stuck on this for a while now, the error message is “The database for PhoenixRest.Repo couldn’t be created: command timed out.”, whenever I run mix ecto.create. Any help would be appreciated, thanks a lot!

config :phoenix_rest, PhoenixRest.Repo,
  username: "postgres",
  password: "postgres",
  database: "phoenix_rest_dev",
  hostname: "localhost",
  show_sensitive_data_on_connection_error: true,
  port: 5432,
  pool_size: 100,
  timeout: 100_000,
  queue_interval: 100_000,
  queue_target: 100_000

Odds are, if you have installed Postgres locally, it isn’t actually running. Try executing pg_ctl start in your shell to spin it up, then try again.

1 Like

Thanks for the answer, I actually fixed the problem by upgrading both Elixir and Phoenix and then create a new app.