unable to connect to server for Postgres

前端 未结 7 1761
刺人心
刺人心 2021-02-02 09:48

I have a problem to connect server for Postgres after I updated my windows.Before I update there is no problem to open the database. My database in Postgres also gone. When I wa

7条回答
  •  独厮守ぢ
    2021-02-02 09:55

    I think the problem is with your server listening to default public IP address. For example in the PostgreSQL package, your sever is set to listen to localhost as default public address which when you launch/ run database, the address might be something like '127.0.0.1'

    To fix you can try change localhost to '' as in "listen_addresses = ''".

    As seen as "listen_addresses = 'localhost'" under "Connection Settings" in the postgresql.conf file.

    Also to access your postgresql.conf file, go to:

    On Windows, the file is in /Program Files/PostgreSQL//share/. On Ubuntu, these files are in /etc/postgresql//main/.

    P.S: Changing the defaults 'localhost'; to '*' will let your server listen to any public database address either "localhost, 127.0.0.1 etc.

    I know you might have fix this, just for others that might run into the same issue in the future. Hope it was helpful

提交回复
热议问题