首页 > 解决方案 > 如何使用您的管理员详细信息登录 psql

问题描述

嗨,我正在关注以下教程

https://www.youtube.com/watch?v=qw--VYLpxG4&t=2224s

当我将 psql 添加到我的路径中然后在终端中输入它时,它会询问我的管理员数据,然后它会显示这个

psql: error: FATAL:  password authentication failed for user "aarushsharma"

如何找到 aarushsharma 的密码?

标签: sqldatabasepostgresqlterminalpostgresapp

解决方案


尝试将 pg_hba.conf 文件中的 METHOD 从 md5 更改为 trust,重新启动 postgresql 服务器并更改您的用户密码

使用密码“your_password”更改用户 aarushsharma;

并再次将 METHOD 设置为 md5


推荐阅读