Ecto Postgres install error password authentication failed

Robert Kass picture Robert Kass · Mar 4, 2016 · Viewed 12.8k times · Source

I created a phoenix project from the hello example using digital ocean. I entered the username and password from the etc/motd.tail file. I keep getting the error message below. I am a beginner and for some reason I just cannot get ecto to install correctly.

** (Mix) The database for Hello.Repo couldn't be created, reason given: psql: FATAL: password authentication failed for user "elixir" FATAL: password authentication failed for user "elixir"

You can use the following Postgress database credentials: * User: elixir * Pass: ***

install. Any help would be appreciated.

Answer

Isa Souza picture Isa Souza · May 22, 2016

I get the same error using Ubuntu 14.04 and I corrected resetting the 'postgres' password:

$ sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"

and restart postgres service:

sudo service postgresql restart