我已经尝试谷歌这个问题很长时间了,但我似乎没有找到解决方案。
我已经在 Windows 上下载了 PostgreSQL,因此有一个用户使用username: postgres
和password: postgres
.
我使用命令行连接没有问题:psql -U postgres
.
问题是当我尝试通过psql
或使用带有npm run start
. 我尝试设置PG_URL=postgres://postgres:postgres@localhost/postgres
,因为我在这个 api 中使用它。
然后我收到错误消息:psql: FATAL: password authentication failed for user "username on my windows computer"
。
在设置此数据库或服务器时,我根本没有在计算机上使用我的用户名,所以我不知道该怎么办。当我尝试通过 psql 登录时,我能想到的密码都不正确。