conn = _connect(dsn, connection_factory=connection_factory, **kwasync)django.db.utils.OperationalError: FATAL: Ident authentication failed for user "postgres"
在python manage.py makemigrations命令出现错误,这种错误主要是postgresql权限的问题,简单的解决办法是设置/var/lib/pgsql/12/data/pg_hba.conf 文件。
local all postgres trust
host all all 127.0.0.1/32 trust
host all all ::1/128 trust
local replication all trust
host replication all ::1/128 trust
把文件第80行以下的内容修改成如上内容即可!
网友评论