1、修改pg_hba.conf
找到pg_hba.conf文件,如D:\Program Files\PostgreSQL\10\data\pg_hba.conf,修改如下
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv4 local connections:
host all all 0.0.0.0/0 md5
2、重啟postgresql-x64-10服務

重啟postgresql-x64-10服務