1、停止postgrsql服务
2、修改pg_hba.conf文件
pg_hba.conf文件的md5修改为trust
3、超级用户登录(cmd模式)
psql -U postgres -p 5434
4、设置密码
alter user postgres with password 'postgres@ncc';
5、修改会刚才的配置文件
pg_hba.conf文件的trust改回md5。
重新启动数据库,输入密码,成功连接服务器。
1、停止postgrsql服务
2、修改pg_hba.conf文件
pg_hba.conf文件的md5修改为trust
3、超级用户登录(cmd模式)
psql -U postgres -p 5434
4、设置密码
alter user postgres with password 'postgres@ncc';
5、修改会刚才的配置文件
pg_hba.conf文件的trust改回md5。
重新启动数据库,输入密码,成功连接服务器。