使用psql远程连接数据库报错:Connection refused 和 No route to host。
1、psql: could not connect to server: Connection refused
[highgo@hgdb ~]$ psql -h 192.168.10.123 -p 5866
psql: could not connect to server: Connection refused
Is the server running on host "192.168.10.123" and accepting TCP/IP connections on port 5866?
2、psql: could not connect to server:No route to host
[highgo@hgdb ~]$ psql -h 192.168.10.123 -p 5866
psql: could not connect to server: No route to host
Is the server running on host "192.168.10.123" and accepting TCP/IP connections on port 5866?
出现报错Connection refused,表示目标主机明确拒绝了这次连接。
出现报错No route to host,表示可能是一个网络问题,并不是目标主机的回复。
详细决解方案请登录【瀚高技术支持平台】查看