1)配置文件路径
/etc/postgresql/16/main
2)配置postgresql.conf
listen_addresses = '*' #监听所有ipv4和ipv6
password_encryption = scram-sha-256 # scram-sha-256 or md5
端口号,最大连接数。。也在此文件里面配置。
3)配置pg_hba.conf
在文件末尾添加一行:host all all 0.0.0.0/0 scram-sha-256
4)重启
sudo systemctl restart postgresql
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/23035300













浙公网安备 33010602011771号