首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >混合ecto.create失败(** (Postgrex.Error)致命的28000 (invalid_authorization_specification)用户“postgres”的身份验证失败)

混合ecto.create失败(** (Postgrex.Error)致命的28000 (invalid_authorization_specification)用户“postgres”的身份验证失败)
EN

Stack Overflow用户
提问于 2022-01-27 14:08:58
回答 1查看 456关注 0票数 0
代码语言:javascript
复制
11:06:04.676 [error] GenServer #PID<0.290.0> terminating
** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) Ident authentication failed for user "postgres"
    (db_connection 2.4.1) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
    (connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol

11:06:04.695 [error] GenServer #PID<0.297.0> terminating
** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) Ident authentication failed for user "postgres"
    (db_connection 2.4.1) lib/db_connection/connection.ex:100: DBConnection.Connection.connect/2
    (connection 1.1.0) lib/connection.ex:622: Connection.enter_connect/5
    (stdlib 3.17) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: nil
State: Postgrex.Protocol
** (Mix) The database for Helloworld.Repo couldn't be created: killed

我什么都试过了。我在费多拉35,我做了所有的官方费多拉PostgreSQL博士说。为此,我更改了pg_hba.conf

代码语言:javascript
复制
# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            ident
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            ident
host    replication     all             ::1/128                 ident

我为用户postgres设置了一个密码,并对其进行了初始化,但没有发生任何事情。

我在这里浏览了大约10个关于StackOverflow的问题,没有一个解决方案是可行的。

有什么帮助吗?

EN

回答 1

Stack Overflow用户

发布于 2022-01-27 14:21:10

只需在ident中将md5替换为md5并重新加载PostgreSQL,就可以对localhost连接使用密码身份验证。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70879977

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档