Odoo中文网|Odoo实施培训
标题:
Postgres数据库忘记密码,三个步骤解决
[打印本页]
作者:
冰糖葫芦
时间:
2015-9-1 10:29
标题:
Postgres数据库忘记密码,三个步骤解决
一、修改data目录下的 pg_hba.conf 文件
将以下这行
host all all 127.0.0.1/32 md5
改为如下:
host all all 127.0.0.1/32 trust
二、运行cmd,进入postgres安装路径的bin目录,运行如下命令:
psql -U postgres
postgres=# alter user postgres with password '你要设置的密码';
postgres=# \q
三、修改data目录下的 pg_hba.conf 文件
将以下这行
host all all 127.0.0.1/32 trust
改为如下:
host all all 127.0.0.1/32 md5
重新启动postgres
欢迎光临 Odoo中文网|Odoo实施培训 (http://www.chinaodoo.net/)
Powered by Discuz! X3.2