【问题标题】:PostgreSQL installation done but commands are no workingPostgreSQL 安装完成,但命令不起作用
【发布时间】:2016-07-25 08:58:58
【问题描述】:

我已经在我的 CentOS 6.5 上安装了 PostgreSQL

我已经安装了相同的 http://www.enterprisedb.com/products-services-training/pgdownload

现在 Postgres 在我检查过的 5432 上运行

netstat -ant|grep 5432

但是当我运行像 postgrespsql 这样的命令时 我收到错误

command not found

请在附件中找到相同的图片。

【问题讨论】:

  • 您需要将这些程序放入您的PATH
  • 我该怎么做?
  • 完成。但是现在当我点击命令 psql 时,它会要求输入密码,并且当我输入我在安装时设置的密码时。它说密码无效。

标签: postgresql centos6.5


【解决方案1】:

您确定要以 root 用户而不是 postgres 用户身份执行此操作吗?

如果您以 postgres 用户身份登录,您将拥有正确的路径,“psql”将以 postgres 用户身份连接。

或者,您可以说“psql -U postgres”,然后当系统提示您输入密码时,您在安装时选择的密码应该可以使用。

【讨论】:

    猜你喜欢
    • 2021-06-22
    • 2014-06-21
    • 1970-01-01
    • 2016-10-05
    • 1970-01-01
    • 2014-11-25
    • 1970-01-01
    • 2013-06-03
    • 1970-01-01
    相关资源
    最近更新 更多