0

因为我使用的是 yocto,所以一切都有些不同。使用常见的 linux 系统(如 ubuntu)postgresql 开箱即用,我知道如何通过编辑 pg_hba.conf 来访问它。

在 yocto 上,一切似乎都有些不同。这是我尝试过的:

  • 启动 yocto 后 postgres 没有运行。我用netstat -tulpn检查了
  • 因此我切换到用户“postgresql”(由我创建)并启动 postgres:pg_ctl start -D /my/path/to/dbFolder。日志说:

数据库系统已准备好接受连接

netstat 现在向我显示本地端口已打开:

tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 266/postgres

但是,我的 pg_hba.conf 包含以下行:

托管所有所有 0.0.0.0/0 信任

但是我的远程系统上的 pgAdmin III 报告

无法连接到服务器:连接被拒绝 (0x0000274D/10061)

可能是什么问题?

4

1 回答 1

1

编辑 postgresql.conf,

listen_adresses = '*'
port = 5432

pg_ctl 重启

于 2014-11-26T08:28:53.110 回答