Postgres数据库忘记密码,三个步骤解决(windows下)
2016-07-29 00:00
162 查看
一、修改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
将以下这行
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
相关文章推荐
- Postgres数据库忘记密码,三个步骤解决(windows下)
- Postgres数据库忘记密码,三个步骤解决(windows下)
- Postgres数据库忘记密码,三个步骤解决(windows下)
- Postgres数据库忘记密码,三个步骤解决(windows下)
- Postgres数据库忘记密码,三个步骤解决
- mysql 5.5 忘记密码解决步骤(windows版)实测可用
- windows下忘记mysql超级管理员root密码的解决办法
- postgresql数据库密码忘记解决办法
- 简单破解忘记Windows密码的解决方法
- 忘记 Windows 7 登录密码的处理步骤
- windows下忘记mysql 密码的解决方法
- 忘记 Windows 7 登录密码的处理步骤
- mysql 忘记密码的解决方法(linux和windows小结)
- 忘记 Windows 7 登录密码的处理步骤 [转]
- 忘记 Windows 7 登录密码的处理步骤
- 忘记windows登陆密码的9种解决方法集锦
- 简单破解忘记Windows密码的解决方法
- windows下忘记mysql超级管理员root密码的解决办法
- windows下mysql忘记root密码的解决方法
- Windows平台下MYSQL破解root密码(忘记root密码的解决方法)