PostgreSQL安装设置

下载

https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

https://get.enterprisedb.com/postgresql/postgresql-18.6-3-windows-x64.exe

安装

双击执行

 

  

局域网连接

在服务器 高级防火墙  入栈规则 加端口 5432

改 postgresql.conf

listen_addresses = '*'

lc_messages = 'UTF8'

这个改完必须重启 PostgreSQL 服务才生效

改 pg_hba.conf

在末尾加一行

允许整个 192.168.1.x 内网

host    all    all    192.168.1.0/24    scram-sha-256

 

然后在本机 执行
SELECT pg_reload_conf();
或者直接重启服务

 

Navicat Premium 17 连接

 

 

 

端口 5432

中文消息乱码

lc_messages = 'UTF8'

SELECT pg_reload_conf();

posted @ 2026-09-08 15:46  simadi  阅读(6)  评论(0)    收藏  举报