刚刚接触linux。项目下linux中安装了pg数据库,结果想单独启动pg数据时报错。
在使用以下脚本启动linux中安装的pg数据库时出现错误。
[xxx@linux-centos7 bin]$ ./pg_ctl -D xxx/xxx/PostgreSQL/9.2/data
出现的错误:
postgres cannot access the server configuration file “xxx /PostgreSQL/9.2/data/postgresql.conf”: No such file or directory。
具体原因:
似乎是由于 启动的语句有问题。不能使用该路径来启动pg数据库。
解决办法:
使用以下语句来启动。
[xxx@linux-centos7 bin]$ ./pg_ctl -D ../data start
其中bin为postgres安装目录中的bin目录。

本文详细解析了在Linux环境中启动PG数据库时遇到的常见错误:无法访问服务器配置文件。文章提供了错误的具体原因及解决方案,指导用户如何正确地使用pg_ctl命令启动数据库。

1993

被折叠的 条评论
为什么被折叠?



