对等身份验证对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.

相关文章

项目需要,有个数据需要导入,拿到手一开始以为是mysql,结果...
本文小编为大家详细介绍“怎么查看PostgreSQL数据库中所有表...
错误现象问题原因这是在远程连接时pg_hba.conf文件没有配置正...
因本地资源有限,在公共测试环境搭建了PGsql环境,从数据库本...
wamp 环境 这个提示就是说你的版本低于10了。 先打印ph...
psycopg2.OperationalError: SSL SYSCALL error: EOF detect...