遗传算法实战:N皇后问题的工程化求解与性能优化
2026/7/1 15:44:03
1.防火墙入站规则、出战规则需要确保5432端口可以正常
2.修改pg_hba.conf文件
# TYPE DATABASE USER ADDRESS METHOD# "local" is for Unix domain socket connections onlylocalall all scram-sha-256# IPv4 local connections:#host all all 127.0.0.1/32 scram-sha-256#允许当前ip 123.123.123.0/24 的所有当前网段的ip访问hostall all123.123.123.0/24 scram-sha-256# IPv6 local connections:hostall all ::1/128 scram-sha-256# Allow replication connections from localhost, by a user with the# replication privilege.localreplication all scram-sha-256#host replication all 127.0.0.1/32 scram-sha-256#host replication all ::1/128 scram-sha-256hostreplication all123.138.72.0/24 scram-sha-256hostreplication all ::1/128 scram-sha-256修改完成后执行,重新加载配置文件
.\pg_ctl.exe reload-D"C:\Program Files\PostgreSQL\17\data"重启服务即可