这是我在一个全新的Phoenix应用程序中看到的错误,我设置它来进行一些试验:
[error] Postgrex.Protocol (#PID<0.362.0>) 连接失败: ** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification): no pg_hba.conf entry for host "24.25.201.68", user "koilqmnaakvfjg", database "dc245o0vlbprf7", SSL off
这是我的 config/dev.exs
文件:
# Configure your database
config :hello, Hello.Repo,
adapter: Ecto.Adapters.Postgres,
username: "koilqmnaakvfjg",
password: "somepass",
database: "dc245o0vlbprf7",
hostname: "ec2-54-243-54-6.compute-1.amazonaws.com",
pool_size: 10
有些简单的东西我错过了吗?
编辑:
我的pg_hba.conf文件看起来像这样:
# TYPE DATABASE USER ADDRESS METHOD
host all all 0.0.0.0/0 md5
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all trust
host replication all 127.0.0.1/32 trust
host replication all ::1/128 trust
24.25.201.68
),位于54.243.54.6
。 - Aleksei Matiushkinhost dc245o0vlbprf7 koilqmnaakvfjg 0.0.0.0/0 password
。 - Aleksei Matiushkin