我有一个安装了Postgres的服务器,我想允许来自外部IP的连接。Postgres非常适合本地连接,然后在文件/var/lib/pgsql/data/postgressql.conf的末尾添加:
listen_addresses = '*'
在/var/pgsql/data/pg_hba.conf的末尾,我补充道:
host all all 0.0.0.0/0 md5
host all all ::/0
也许这个问题重复,但我没有得到任何解决办法,我正在使用centos 7和Postgres 9.3。当通过错误连接PostgreSQL服务器时,
错误
拒绝连接是在主机"localhost“(::1)上运行并在端口5432上接受TCP/IP连接的服务器。
即使我设置了pg_hba.config文件,但仍然得到了相同的错误,我试图删除postmaster.pid,但是我得到了一个错误no such file and no pid exist,请告诉我解决方案
当我试图连接远程云上的Postgres时。它显示:
psql: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
本地系统- Postgres 9.3 (windows)
远程系统在Azure上-- Postgres 9.2(centos)
我使用的命令:psql -h "abc.cloudapp.net" -p 5432
我已将结束点设
我正在使用postgres:9.5.3码头形象。我正在启动容器,然后尝试从远程主机连接到psql数据库,但每次失败时都会出错:
psql: could not connect to server: Connection refused
Is the server running on host "172.18.0.2" and accepting
TCP/IP connections on port 5432?
在我的停靠-撰写文件中,我正在挂载pg_hba.conf。这是我的停靠-撰写文件:
services:
db:
networks:
我不知道发生了什么,但我在周五登录,并使用psql -d名称访问运行良好的db。然后在这个星期一的早上登录,尝试使用psql -d dbname访问相同的数据库,这就是我得到的结果:
psql: FATAL: no pg_hba.conf entry for host "[local]", user "johndoe", database "db", SSL off
我试过sudo su postgres,然后我得到了这个:
psql: FATAL: password authentication failed for user "p
在CentOS上,我试图使用rake将数据从sqlite3迁移到postgresql。
当我尝试使用命令行连接到PostgreSQL时:
psql -d <db> -U <user> -W
我得到:
psql: FATAL: Peer authentication failed for user "blah"
对于测试,我甚至将方法设置为信任psql。这是我的pg_hba.conf的内容
local all all trust
# IPv4 local connection
我的Pgadmin3有问题..。我过去经常使用去年,但是今年我不能用pgadmin连接本地主机服务器。
这是消息错误:
FATAL: no pg_hba.conf entry for host "127.0.0.1", user "postgres", database "postgres", SSL on
FATAL: no pg_hba.conf entry for host "127.0.0.1", user "postgres", database "postgres", SSL off
我
我在centos中看到了postgre的错误
无法连接到PostgreSQL服务器:致命:主机“:1”没有pg_hba.conf条目,用户"xxx",数据库"xxx_xxx",
这是我的pg_hba.conf
local all all md5
host all all 127.0.0.1/32 md5
一切看起来都是正确的,但是无论我创建和设置了什么用户,总是会遇到这个错误。
我在docker中启动了postgresql服务器,并通过sudo docker run -it -p 5432:5432 9c421f1a239c bash暴露了5432端口,并在docker容器中手动启动postgres服务器,但无法使用命令:psql -h 172.17.0.63 -U venti连接到它。172.17.0.63是一个正确的IP,venti是我的pg用户名。但是get错误:
psql: could not connect to server: Connection refused
Is the server running on host "172.17