找到安装目录,然后寻找data文件夹下面的pg_hba.conf
修改文件内容
将最下面的 scram-sha-256 加密方式修改为 trust
# "local" is for Unix domain socket connections only
local all all scram-sha-256
# IPv4 local connections:
host all all 127.0.0.1/32 scram-sha-256
# IPv6 local connections:
host all all ::1/128 scram-sha-256
修改为
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
重启数据库服务