django后台用的是postgresql数据库,但是启动是的时候报如下错误:
psql: FATAL: Ident authentication failed for user “postgres”
这个一般是pg_hba.conf文件中未设置 成功 ,方法如下:
先找出pg_hba.conf的位置 find / -name pg_hba.conf
一般位置如下: /var/lib/pgsql/9.5/data/pg_hba.conf
取消那些注释#, 特别是最后几行
local replication postgres trust
host replication postgres 127.0.0.1/32 trust
host replication postgres ::1/128 trust
然后重新 数据库就好了
service postgresql-9.5 restart