繁体   English   中英

如何在MacOS 10.8.5上配置PostgreSQL服务器?

[英]How to configure PostgreSQL server on MacOS 10.8.5?

我正在尝试从命令行连接到我的postgres服务器:

    $> psql
    psql: could not connect to server: No such file or directory
      Is the server running locally and accepting
         connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

我正在尝试运行服务器:

    $>postgres
    postgres does not know where to find the server configuration file.
    You must specify the --config-file or -D invocation option or set the 
    PGDATA environment variable.

谁能为我指出如何配置服务器以使其正常工作?

我已经解决了这个问题。 实际上,Mac OS 10.8.5有自己的psql命令。 所以这是一个路径问题。 如果从MacPort安装postgres,则系统将始终引用初始的psql命令。

我建议你如图所示,从酿造的Postgres安装在这里

您还将重新定义PATH环境变量并将其导出到.profile文件中:

export PATH=/usr/local/bin:$PATH

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM