使用navicat连接本地PostgreSQL数据库时报错:

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

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

首先检查一下是不是没有启动PostgreSQL服务,因为没启动服务可能会报这个错误(我就是);

方法如下:

win+R打开输入命令框,输入services.msc打开服务列表。

再次尝试连接数据库,看是否成功,如果没成功那就进行以下步骤:

1、在postgresql的安装文件夹\9.5\data\pg_hba.conf里面找到“# IPv4 local connections:”

然后在这行上面添加“local pgsql all trust”,
在它下面的“host    all         all         127.0.0.1/32          md5”

下面添加一行,内容为“host all all 192.168.91.1/24 md5”


注:127.0.0.1/32和192.168.91.1/24中的32与24,用32表示该IP被固定,用24表示前3位固定,
后面一位可以由自己设,这样,前3位ip地址与该设定相同的计算机就可以访问postgresql数据库。

2、PostgreSQL\9.5\data\postgresql.conf文件中,找到“#listen_addresses = 'localhost'”,把它改成“listen_addresses = '*'”。这样,postgresql就可以监听所有ip地址的连接。

3、然后重启postgresql服务。如果系统启用了防火墙,请先关闭。如果要使用pgadmin连接远程的数据库服务器,须在SSL的选项中选择允许。

服务器是否在主机“192.168.113.154”上运行并且在5432上接受TCP / IP 连接 ?无法 连接 到服务器: 连接 被拒绝( 0x0000274D / 10061 ) could not connect to server : Connection timed out (Ox0000274C/10060) ls the server running on host "xxx" and accepting TCP/IP connection s on port 5432?      经常使用 PostgreSQL 数据库 的用户,在用 Navicat 客户端 连接 服务器端时, 报错 :      Could not connect to server Connection ref could not connect to server : Connection ref u sed Is the server running on host host.domain.com and accepting TCP/IP connection s on port 5432? 第一步:设置pg_hba.conf $ su - postgres $ vi /usr/loca... 问题在pgAdmin中,将本地 数据库 连接 的host由localhost或127.0.0.1改为自己的真实ip–10.xxx.xxx.xxx后, 连接 失败, 报错 如下:psql: could not connect to server : Connection ref u sed Is the server running on host "my host name" (IP) and accepting Win10系统更新后,启动项目,显示拒绝 连接 。之后打开pgAdmin登录操作,但失败了!并显示错误信息。 could not connect to server : Connection ref u sed ( 0x0000274D / 10061 ) Is the server ... 原因分析: 本以为是pg_hba.conf与 postgresql .conf被改动了,但检查发现没有问题。 ![在这里插入图片描述](https://img-blog.csdnimg.cn/20210330101100 could not connect to server : Connection ref u sed ( 0x0000274D / 10061 ) Is the server running on host"localhost"(::1)and accepting TCP/IP connection on port 5434?.. 打开 postgresql 输入密码 连接 不上 报错 这种情况大概率是 数据库 没有启动 启动一下就好了 打开任务管理器-----服务----找到 postgresql 服务-----右键开始 然后重开p 文章目录1. 问题描述2. 问题分析3. 解决方案 1. 问题描述 使用psql(客户端)尝试 连接 到指定公网IP地址的 PostgreSQL 服务时候,收到了错误提示信息,如下所示: psql: could not connect to server : Connection ref u sed Is the server running on host "192.168.0.22" and accepting TCP/IP connection s on port 5432? 当 连接 瀚高 数据库 时,由于端口用的不是默认的5432,导致当前服务器可以 连接数据库 ,而远程不能 连接数据库 并且在服务端的服务器上用pgadmin也登录不上。很可能由一下几个原因导致: 1:服务端的防火墙阻隔: 首先关闭防火墙,然后在防火墙的高级设置里面设置一个入站规则以及一个出站规则; 2:安装完 数据库 没有配置pg_hba.conf文件和 postgresql .conf文件 完成之后,重启 数据库 或者重... 先将 postgresql 服务关闭,执行C:\Windows\System32>net stop PostgreSQL 想让 postgresql 支持远程访问的话需要借助自带图形化工具pgAdmin,点击pgAdmin菜单文件-打开 postgresql .conf...,将该文件中的listen_addresses项值设定为“*”,在9.0Windows版中,该项配置已经是“*”无需修改。如下所示: 问题描述:装完Greenplum6.40后出现的 报错 PostgreSQL 连接 出错 ,could not connect to server : Connection ref u sed ( 0x0000274D / 10061 ) 解决方案(仅供参考):检查防火墙有没有开放5432端口,我的防火墙是关闭的,但是重新开启防火墙后,再开放5432端口,就可以 连接 上了。 查看防火墙状态: systemctl status firewalld 开启/关闭防火墙: systemctl start firewalld systemc 相信大家用开源笔记软件就是为了隐私和信息安全,但是同步不比onenote等其他软件方便,需要自己配置。我花了1个晚上在配置过程中,踩了几个坑,这里写出来共享一下。目前国内joplin软件的资料还比较少,而google上还是有一些资料的,这篇文章希望能丰富中文区的资料吧。 买服务器,域名可以不要,直接ip也行,安装httpd(apache)。这些可以找其他教程,此处略 1.修改配置文件httpd.conf和httpd-dav.conf 我的apache配置文件目录在 /usr/local/apache/