postgresql - 在 Windows 7 上更改/重置 postgresql 用户密码

标签 postgresql windows-7

几天前,我在本地计算机上安装了 postgesql 9.2 版本。 (操作系统 Windows 7)

现在我忘记了密码,无法登录 pgAdmin。

如何在 Windows 7 上更改 postgresql 密码?

最佳答案

pg_hba.conf 文件中,(临时)将所有 METHOD 更改为 trust。例如:

host    all             all             ::1/128                 trust

代替:

host    all             all             ::1/128                 md5

您可以通过在 psql 命令行中键入找到 pg_hba.conf 所在的位置:

SHOW hba_file;

关于postgresql - 在 Windows 7 上更改/重置 postgresql 用户密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18587710/

相关文章:

python pgdb挂数据库

postgresql - 在postgres中使用存储过程更新?

postgresql - 在postgres中获取月份的第一个日期

windows - 如何隐藏随我的应用程序一起打开的控制台窗口?

c++ - eclipse 中使用 qt 插件的 qt gui 项目

sql - Postgresql - 多重选择条件

python - 我的本地 postgresql 数据库 url 的形式是什么?

windows-7 - 以管理员身份运行脚本文件

windows - 用于查看可执行镜像加载了哪些文件/dll 的实用程序

windows-7 - 如何在 Windows 7 中禁用/永久隐藏任务栏?