Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.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/clojure/3.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 Postgres服务无法启动_Postgresql - Fatal编程技术网

Postgresql Postgres服务无法启动

Postgresql Postgres服务无法启动,postgresql,Postgresql,我对博士后有意见。由于pg_hba.conf文件中的更改,它将停止 实际上,我的postgres没有与PHP连接 因此,我更改了/var/lib/pgsql/data/pg_hba.conf文件中的方法: TYPE DATABASE USER ADDRESS METHOD host all all 127.0.0.1/32 iden

我对博士后有意见。由于
pg_hba.conf
文件中的更改,它将停止

实际上,我的postgres没有与PHP连接

因此,我更改了
/var/lib/pgsql/data/pg_hba.conf
文件中的方法:

TYPE     DATABASE           USER            ADDRESS                 METHOD
host       all              all             127.0.0.1/32            ident
为了解决连接错误,我将方法ident更改为trust,postgresql服务程序停止

即使未启动,我也会回滚更改

错误是:

日志:无法打开配置文件“/var/lib/pgsql/9.4/data/pg_hba.conf”:权限被拒绝


我假设postgresql与标准配置中的postgres用户一起运行

从终端,作为根:

ls -l /var/lib/pgsql/9.3/data/pg_hba.conf
并核实所有者。如果所有者不是postgres:

chown postgres:postgres pg_hba.conf
并确保其具有读写权限:

chmod u+rwx pg_hba.conf

PostgreSQL版本?当您尝试启动PostgreSQL日志文件时,日志文件中的错误消息是什么?请添加日志中的错误。PostgreSQL版本为9.4当我使用/etc/init.d/PostgreSQL-9.4 start启动服务时,它显示如何检查错误日志失败。我使用cent OSTNANKX回复,我始终使用postgres用户登录,因此用户是postgres,即使未启动,我也会更改pg_hba.conf文件权限当前postgresql是否与postgres用户一起运行?您是如何编辑配置文件的?(gedit、vi、ecc…)我将method ident更改为trust,然后它停止,然后我回滚更改,但没有启动。如果gedit位于远程计算机上,问题是gedit(它重写了文件,破坏了权限)。只需通过shell登录并验证权限。我很确定问题是存在的。如何做到这一点亲爱的请告诉我