我得到的密码验证失败。我试过使用METHODS peer、trust、ident。确保重新启动或重新加载conf.
sudo -u postgres psql -U postgres
用户postgres的密码:psql:FATAL:用户"postgres"的密码身份验证失败
sudo service postgresql reload
我的pg_hba.conf:
# TYPE DATABASE USER ADDRESS METHOD
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
对ubuntu/linxs 执行此步骤
->sudo-u postgres psql
->postgres=#
在正确的之后
->postgres=#\password
为用户"postgres"输入新密码:
再次输入:
现在检查,新密码工作成功。