重新设置postgres用户的密码方法:
1、关闭数据库服务
2、进入数据库的工作空间目录 (如果是建库是没有另外指定,应该就是postgresql安装目录下的 data 目录)
3、编辑修改文件 pg_hba.conf, 把连接权限设置的 md5 加密方式 改成 trust
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv4 local connections:
host all all 127.0.0.1/32 trust
4、进到psql
5、修改数据库密码
alter user postgres with password '新密码';
6、启动数据库