【发布时间】:2020-11-09 08:05:54
【问题描述】:
-
我确实在 Centos AMI EC2 上设置了 Postgres-12,效果很好。
-
但是,有时(我的情况是第二天)我无法通过尝试连接我的数据库
$psql -h XXXX -p5432 -Upostgres
身份验证失败错误
psql: error: could not connect to server: FATAL: password authentication failed for user "postgres"
-
接下来,我再次更改我的 postgres 用户
$sudo su - postgres ~]$ psql -c "alter user postgres with password 'postgres'"
连接登录成为工作。
- 但有时又变成不工作(同上验证失败) 我用上面的命令重置了 postgres 密码 => 连接登录成为工作。
- 重复 #2
我不知道为什么。有人知道吗?我该怎么办?
【问题讨论】:
标签: postgresql amazon-ec2