远程连接postgresql “postgres“, no encryption pg hba.conf


SL 关闭 的 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)

原因:

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

解决方法:

1、找到pg_hba.conf文件(在Postgre安装文件目录下的data文件夹中)

2、打开pg_hba.conf文件,并在文件末尾添加
host all all 0.0.0.0/0 md5

3、重启postgresql的服务,应该就可以连了。
————————————————
原文链接:https://blog.csdn.net/cuisidong1997/article/details/135522383

声明:一代明君的小屋|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - 远程连接postgresql “postgres“, no encryption pg hba.conf


欢迎来到我的小屋