Alexandre1972
An error message when running the "mix ecto.create" command
Hi!
I’m new here.
I was reading this page:
https://hexdocs.pm/phoenix/up_and_running.html
And then, when I tried to run it, I’ve got this message:
19:26:35.127 [error] GenServer pid<0.259.0> terminating
** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user “postgres”
(db_connection 2.3.0) lib/db_connection/connection.ex:99: DBConnection.Connection.connect/2
(connection 1.0.4) lib/connection.ex:622: Connection.enter_connect/5
(stdlib 3.13.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
** (Mix) The database for Hello.Repo couldn’t be created: killed
===
Does anybody know how can I fix?
Thank you for any help.
Alexandre.
Most Liked
silverdr
The default Phoenix setup uses username and password set to “postgres”. The problem is that vanilla PostgreSQL setup does not have this particular password set for the superuser role “postgres”. Either:
- set the desired password (“postgres”) for the user/role “postgres”
- add your own user (role) to the DB with your own username and password. Give it only necessary privileges, and update the
dev.exs(or other, appropriate config file) accordingly
I always do the latter. YMMV.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #hex









