postgresql 数据库 报错 server closed the connection unexpectedly 无法远程连接数据库 解决方法

因本地资源有限,在公共测试环境搭建了PGsql环境,从数据库本地localhost访问正常,在相同网段的远程机器访问报如下错误

“server closed the connection unexpectedly.        This probably means the server terminated abnormally before or  while processing the request”

检查pg日志,报错日志为FATAL:  no pg_hba.conf entry for host "XX.XX.XX.XX",经查阅,这条错误的原因是因为客户端远程访问postgresql受限所致,因为postgresql认情况下除本机外的机器是不能连接的。修改pg_hba.conf与postgresql.conf两个配置文件即可解决

修改方式请参考 

《postgresql 报错 FATAL: no pg_hba.conf entry for host 未配置允许远程连接 解决方法

https://blog.csdn.net/whatday/article/details/128579053

相关文章

项目需要,有个数据需要导入,拿到手一开始以为是mysql,结果...
本文小编为大家详细介绍“怎么查看PostgreSQL数据库中所有表...
错误现象问题原因这是在远程连接时pg_hba.conf文件没有配置正...
因本地资源有限,在公共测试环境搭建了PGsql环境,从数据库本...
wamp 环境 这个提示就是说你的版本低于10了。 先打印ph...
psycopg2.OperationalError: SSL SYSCALL error: EOF detect...