我是靠谱客的博主 陶醉八宝粥,这篇文章主要介绍python postgressql联接失败,现在分享给大家,希望可以做个参考。

could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

出现此错误,一是要考虑下pg_hba.conf文件中的配置

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust
 

第二步:看看服务中的开启没开启,今天不知为何,开启选项设成手动了,连不上,可能是360整理是调的

 

最后

以上就是陶醉八宝粥最近收集整理的关于python postgressql联接失败的全部内容,更多相关python内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(107)

评论列表共有 0 条评论

立即
投稿
返回
顶部