WE中国博客
postgresql 忘记管理员密码的解决办法 - WEB服务器管理 - WE中国博客
发布:WE中国 发布时间:2010-03-10

首先打开data目录下的pg_hba.conf配置文件,找到:

# IPv4 local connections:
host    all         all         127.0.0.1/32          md5

然后把md5改成trust,重新启动。

psql -d template1 -U postgres -c "alter role postgres password ‘123456’;"

 

新密码既为123466,此时可以将pg_hba.conf恢复

本页地址:http://www.webedit.cn/blog/webserver/1268187950.html
Last update: 03/10/2010 Views :195 Tags: postgresql pgsql postgres

特别推荐

关于作者[freebsdtop@163.com]
Webedit.cn主要设计师.
多年网络系统开发经验,涉及领域从企业站点到网络商城.
签名:有朋自远方来,不也乐吗?
文章分类
特别推荐
Copyright © WebEdit.cn 2006-2009