unable to connect to server for Postgres

前端 未结 7 1747
刺人心
刺人心 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 10:10

    There are two items to configure if your server isn't on localhost:

    • find your postgresql.conf and add your server's public IP address to the end of the setting listen_addresses (separate multiple entries by commas); uncomment the line if it is commented out (e.g. with '#')
    • add a line to pg_hba.conf containing your client's IP address - you may copy the line containing 127.0.0.1 and change only the IP address

    On Ubuntu, these files are in /etc/postgresql//main/.

提交回复
热议问题