Error while creating a database in Phoenix 1.4 - the database couldn’t be created: command timed out

hi, I recently upgraded to the phoenix 1.4 , While creating the new project it doesnt created a database , It asked me to go to devs.ex and configure the database password. Then I put my correct database username and password. later I wrote a command mix ecto.create , but finally i got the below error

C:\Users\hones\chatr>mix ecto.create
Compiling 13 files (.ex)
Generated chatr app
** (Mix) The database for Chatr.Repo couldn’t be created: command timed out

please help me , to know what is the problem

I’m not sure how this is related to phoenix… But how have you updated? Whats your version of ecto, phoenix_ecto and optionally ecto_sql?

Take a look at your mix.exs as well as mix.lock and tell us which versions you specified and wich are actually locked and used.

Thanks for your reply, the problem is solved magically , i dont know what happened.
when i opened pgadmin it shows the database , which previously got error. I created different projects iam getting the error, unable to create database . after sometime when I visits the pgadmin is shows db is created

I’ve had this happen as well. Error with the “command timed out”, but the database was created in the background after all.

1 Like