Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用户的postgresql 9.3身份验证失败_Postgresql_Yii2_Centos7 - Fatal编程技术网

用户的postgresql 9.3身份验证失败

用户的postgresql 9.3身份验证失败,postgresql,yii2,centos7,Postgresql,Yii2,Centos7,无法通过yii2迁移脚本登录postgresql。在centos 7上运行 致命的错误总是 Error: SQLSTATE(08006) [7] FATAL: Ident authentication failed for user "username" 我已经更改了pg_hba.conf,其中不再包含用于身份验证的标识。但是它仍然试图运行ident而不是trust、password或md5(尝试了所有这些) 我猜由于某种原因,它没有读取pg_hba.conf文件,我已经在postgre

无法通过yii2迁移脚本登录postgresql。在centos 7上运行

致命的错误总是

Error:  SQLSTATE(08006) [7] FATAL:   Ident authentication failed for user "username"
我已经更改了pg_hba.conf,其中不再包含用于身份验证的标识。但是它仍然试图运行ident而不是trust、password或md5(尝试了所有这些)

我猜由于某种原因,它没有读取pg_hba.conf文件,我已经在postgresql.conf中手动添加了它的完整路径,但仍然说ident身份验证失败

pg_hba.conf包含

local   all             all                                     password
host    all             all             127.0.0.1/32            password
host    all             all             ::1/128                 password

我可以从命令行登录,没有问题。

您可以使用systemctl start postgresql-9.3启动服务,但停止并重新启动并不是重新加载数据。我必须重新启动服务器才能让它重新加载数据

初试

systemctl stop postgresql-9.3
systemctl start postgresql-9.3
如果不起作用,请重新启动计算机