linux下的postgre服务无法启动解决方案

本文详细记录了解决服务器断电后PostgreSQL无法远程连接,包括关闭防火墙、初始化数据库、配置pg_hba.conf、SSL设置等步骤,以及遇到的各种错误及其解决办法,适合IT运维和数据库管理员参考。
摘要由CSDN通过智能技术生成

公司断电,来电后服务器的postgre无法远程连接
首先登录服务器查看防火墙
https://www.php.cn/linux-443556.html

关闭防火墙后启动postgre
https://www.cnblogs.com/wang-yaz/p/10815251.html

发现还是启动失败
报错 pg启动报错: Job for postgresql-9.6.service failed because the control process exited with error code
解决:https://blog.csdn.net/weixin_42356358/article/details/88874068
https://cloud.tencent.com/developer/article/1391813
注意:

[root@VM_152_4_centos ~]# /usr/pgsql-11/bin/postgresql-11-setup initdb
Initializing database ... OK

这一命令会清空表,慎用!!!!!!!!

再次启动postgre,成功
https://www.jianshu.com/p/dac86752e488

但是远程连接仍然报错
could not connect to server:connection refused (0x0000274D/10061)is the server running on host ‘10.0.2.23’ and accepting TCP/IP connections on port 5432?
解决:
https://www.cnblogs.com/dagestar/articles/3557306.html

但是又报错
FATAL:no pg_hba.conf entry for host ‘10.0.32.180’,user’postgres’, database ‘postgres’, SSL off
解决:
https://cloud.tencent.com/developer/ask/38775

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值