Timeout expired pgadmin Unable to connect to server

末鹿安然 提交于 2020-07-18 08:10:13

问题


I am following the step by step instructions from this link https://www.postgresqltutorial.com/connect-to-postgresql-database/ here to create a simple server on pgadmin. Please check the picture

What am I doing wrong, I installed pgadmin on my macOS but I don't see why I am getting this error. Please help


回答1:


In the file pg_hba.conf you have to change:

host    all             all             <your_ip/mask>          ident

to:

host    all             all             <your_ip/mask>          md5

<your_ip/mask> is your ip address where you are connecting from. For example 10.1.1.5/32.

You have to add one if it doesn't exist yet.

I'm using CentOS so the file pg_hba.conf is located in /var/lib/pgsql/data for me. If you don't know where the file is located on your OS you can use the search to find the file.



来源:https://stackoverflow.com/questions/60532791/timeout-expired-pgadmin-unable-to-connect-to-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!