Postgres数据库忘记密码,三个步骤解决(windows下)
2011-11-22 15:27
204 查看
一、修改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版)实测可用
- 数据库之mac上mysql root密码忘记或权限错误的解决办法
- 解决Windows&Linux下Mysql忘记ROOT密码
- windows下mysql忘记root密码的解决方法(方法二OK)
- windows环境中mysql忘记root密码的解决办法
- Windows下mysql忘记root密码的解决方法
- 安装widows mysql 免安装版(zip) 步骤详解 以及遇到问题解决 以及忘记密码的修改方法
- windows下mysql忘记root密码的解决方法
- windows下mysql忘记root密码的解决方法
- Windows下mysql忘记root密码的解决方法
- Windows下mysql忘记root密码的解决方法
- Windows下mysql忘记密码的解决方法
- MySQL账号密码忘记解决方法(windows环境下亲测有效)
- ubuntu解决远程访问数据库问题及忘记数据库密码
- [转载]MySQL忘记密码的解决方法(Windows, Linux)