postgres 的 pgAdmin4 登录问题

pgAdmin4 login issue with postgres

我安装了 postgresql 并使用此配置编辑了 pg_hba.conf:

local   all             postgres                                md5
host    all             postgres        all                     md5
local   all             all                                     peer
host    all             all             127.0.0.1/32            scram-sha-256
host    all             all             ::1/128                 scram-sha-256
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            scram-sha-256
host    replication     all             ::1/128                 scram-sha-256

我还确保能够使用 psql -U postgres -W 登录并且我可以登录。

我安装了 pgAdmin4 但无法通过 postgres 登录。
它说:Email/Username is not valid

我搜索了几个小时但没有找到解决方案。

Ubuntu 服务器 20 LTS + Postgressql 14
有帮助吗?


谢谢

“Email/Username 无效”出现在 pgAdmin Web 模式的登录屏幕上。它不同于 PostgreSQL 服务器登录。首次设置 pgAdmin web 时,您必须设置电子邮件和密码。 顺便说一句,如果您可以访问 pgadmin4.db 文件并且不记得 email/password,那么您可以从 /.pgadmin/pgadmin4.db 中删除该文件并再次启动 pgAdmin。