Cannot connect to postgres from remote host

前端 未结 6 1287
刺人心
刺人心 2020-12-13 12:50

I have a database server (192.168.1.50) running postgres. I have created a database named \"testdb\" and a user \"testuser\" with password \"testuserpw\".
Locally, I can

6条回答
  •  星月不相逢
    2020-12-13 13:40

    Check the setting of listen_addresses in your postgresql.conf file. Many distributions make it default to 127.0.0.1, i.e. listen only to connections coming in from localhost. It should be set to '*' to listen for connections on all interfaces.

    If you are still having trouble, use lsof to see what network sockets the postgres process is listening on.

提交回复
热议问题