SQLAlchemy - 用户“postgres”的密码身份验证失败

问题描述 投票:0回答:1

我有以下部分代码:

engine = create_engine("postgresql+psycopg2://postgres:root@localhost/postgres2")

当我运行它时,我收到错误:

connection to server at "localhost" (::1), port 5432 failed: FATAL:  password authentication failed for user "postgres"

如何解决?

我尝试更改用户名,但没有成功。

python sqlalchemy
1个回答
0
投票

我重置了 postgresql 中的设置

© www.soinside.com 2019 - 2024. All rights reserved.