Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The database for Rumbl.Repo couldn't be created: killed

I created a new project using mix phx.new rumbl which worked fine. Then I went to the project folder using cd rumbl. After that I tried to run mix ecto.create which resulted in this error message:

D:\Elixir\Projects\rumbl>mix ecto.create

10:35:16.370 [error] GenServer #PID<0.212.0> terminating
** (DBConnection.ConnectionError) tcp connect (localhost:5432): connection refused - :econnrefused
    (db_connection) lib/db_connection/connection.ex:84: DBConnection.Connection.connect/2
    (connection) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
** (Mix) The database for Rumbl.Repo couldn't be created: killed

Yesterday mix ecto.create worked, but now it gives this error. I have installed the dependencies without any problems Elixir version: 1.8.2 phoenix version: 1.4.6

I have tried reopening the command prompt, restarting my laptop and using a different folder

like image 614
Tessa van der Heijden Avatar asked Sep 15 '25 09:09

Tessa van der Heijden


1 Answers

Your Postgres database is not running or not open on this port.

You should install postgres and start it.

If you don't want to handle with postgres issues or are not familiar with that, take a look on this post about how to have it running on a docker container.

like image 166
Marcos Tapajós Avatar answered Sep 18 '25 12:09

Marcos Tapajós