问题
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