赞
踩
$ vi /var/lib/pgsql/12/data/pg_hba.conf
# 最后一行添加
# local replication all peer
host all all 0.0.0.0/0 md5
## 重启
$ service postgresql-12.service restart
$ psql -h localhost -p 5432 -d demo -U postgres
psql (12.4)
Type "help" for help.
demo=>
$ ALTER USER postgres WITH PASSWORD '123456';
ALTER ROLL
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。