11 postgresql
我正在尝试在新的 Ubuntu VM 上设置 django。我一直在学习教程,直到我做到这一点:
psycopg2.OperationalError: FATAL: Ident authentication failed for user "postgres"
Run Code Online (Sandbox Code Playgroud)
Ubuntu 用户“postgres”的密码设置为 123456:
sudo su postgres -c passwd
Run Code Online (Sandbox Code Playgroud)
使用 pdadmin,我连接到 localhost 上的 pg 实例,进入登录角色,右键单击用户“postgres”并将密码设置为 123456。然后单击“确定”并退出 pgadmin3。
但是,即使做了这一切,
psql -U postgres -W
Run Code Online (Sandbox Code Playgroud)
拒绝我给它的密码。即使 settings.py 已使用正确的信息进行设置,Django 也会继续给我同样的错误。
谁有想法?