密码忘记的

pg_hba.confsql

sudo vim /var/lib/pgsql/data/pg_hba.confvim

把md5全改为trustpost

而后重启postgresqlspa

而后psql -U postgres登陆postgresql

或者用pgadmin登陆进去,在左边最下边role下面,右键属性,第二个密码输入两遍,而后把trust全改为md5,重启postgresql便可。md5

相关文章
相关标签/搜索