在过去的6个月中,当我意识到我们现有系统存在问题时,我一直在研究我们公司的新API。我尝试再次访问我的本地环境以尝试进行调试,结果发现我的本地数据库由于未知原因被锁定,密码不是root
(我设置的初始密码)。现在,我根本无法登录到本地数据库服务器,也无法编辑pg_hba.conf
文件并重新启动服务器。它仍在要求输入密码。任何意见是极大的赞赏。规格和屏幕截图如下:
Environment: Windows 10 Pro
Codebase Language: Elixir
DB: postgresql 10
Port: 5432
config :rog_api, RogApi.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "root",
database: "rog_api_local",
hostname: "localhost",
pool_size: 18
pg_hba.conf文件:
# TYPE DATABASE USER ADDRESS METHOD
host all all all trust
# IPv4 local connections:
#host all all 127.0.0.1/32 md5
# IPv6 local connections:
#host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication all 127.0.0.1/32 md5
#host replication all ::1/128 md5