微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

对等身份验证对postgresql意味着什么?

我正在尝试登录我的数据库并收到此错误
root@---:~# psql -U user database
psql: FATAL:  Peer authentication Failed for user "user"

这是什么意思?
我很确定我可以通过将peer放入我的pg_hba.conf来修复它,但我不确定我是否应该如此……

这意味着系统尝试进行对等身份验证( …obtaining the client's operating system user name from the kernel and using it as the allowed database user name (with optional user name mapping). This method is only supported on local connections.),但失败了.

您的pg_hba.conf是否配置为本地连接的对等身份验证?
如果是这样,您可能需要将其更改为更合适的身份验证方法,例如md5或trust(不推荐).
有关更多信息,请参阅Postgres Manual.

原文地址:https://www.jb51.cc/postgresql/192484.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐