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

图片[1] - windows安装PostgreSQL后进行远程连接,发生SSL错误 - MaxSSL

2. 原因

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

3. 解决方法

  • 找到pg_hba.conf文件(在Postgre安装文件目录下的data文件夹中)
  • 打开pg_hba.conf文件,并在文件末尾添加
    hostallall0.0.0.0/0md5
  • 重启postgresql的服务
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享