Hello,
I cannot get postgres to work… I am using WSL2 with Ubuntu 20.04 on Windows 10. I have installed erlang and elixir via ASDF and launched a phoenix app without ecto successfully.
Now I want to set up postgres:
sudo apt install postgresql postgresql-contrib
sudo passwd postgres
For testing purposes I just set the password to ‘postgres’.
sudo service postgresql start
In my config/dev.exs I use:
config :my_app, MyApp.Repo,
username: "postgres",
password: "postgres",
database: "my_app_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10
mix ecto.create
brings following error message:
19:01:48.679 [error] GenServer #PID<0.284.0> terminating
** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "postgres"
(db_connection 2.4.0) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
(connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
(stdlib 3.16) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
19:01:48.696 [error] GenServer #PID<0.291.0> terminating
** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "postgres"
(db_connection 2.4.0) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
(connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
(stdlib 3.16) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
** (Mix) The database for MyApp.Repo couldn't be created: killed
Please help.