windows安装PostgreSQL后进行远程连接,发生SSL错误

1. 报错情况

SSL 关闭 的 pg_hba.conf 记录 (pgjdbc: autodetected server-encoding to be

GB2312, if the message is not readable, please check database logs

and/or host, port, dbname, user, password, pg_hba.conf)

或是乱码提示,提示中有SSL、 pg_hba.conf

2. 原因

在远程连接时pg_hba.conf文件没有配置正确

3. 解决方法

  • 找到pg_hba.conf文件(在Postgre安装文件目录下的data文件夹中)
  • 打开pg_hba.conf文件,并在文件末尾添加
    host all all 0.0.0.0/0 md5
  • 重启postgresql的服务
相关推荐
lzhdim19 小时前
C# 通过 Windows API 实现进程内存读写操作
开发语言·windows·c#
CIAS21 小时前
Windows powershell下实现空间释放
windows
AxureMost21 小时前
NeeView图像查看
windows
赵广陆1 天前
Model I/O进阶
windows
问商十三载1 天前
RAG 检索效果差怎么排查?2026 五层诊断法完整指南
开发语言·人工智能·windows·python·算法
Zguigo1 天前
第25-26讲:计算机操作系统存储管理——分页机制、页表与快表(TLB)
linux·windows·笔记
PGCCC2 天前
Ubuntu 安装 PostgreSQL 16 完整教程(2026):从仓库配置到远程连接
linux·ubuntu·postgresql
垂直昵称2 天前
多线程实现网页接口并发压力测试
linux·服务器·windows
%d%d22 天前
Windows 本地部署小红书 MCP + OpenAI Tunnel + ChatGPT 接入全流程
windows·chatgpt
jnrjian2 天前
postgres database 更换用户
数据库·postgresql