postgresql数据库备份报错:
备份代码:g_dump -h localhost -U postgres -d xxx > ./xxx_20221014.sql
出现错误
pg_dump: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: no pg_hba.conf entry for host "::1", user "postgres", database "xxx", no encryption
data目录下pg_hba.conf添加
host all all ::1/128 trust
然后pg_ctl reload 即可