当我连接到远程服务器上的 psql 时
>psql -h {hostname}
psql: could not connect to server: Connection timed out (0x0000274C/10060). Is the server running on host "{hostname}" (194.58.98.133) and accepting TCP/IP connections on port 5432?
Run Code Online (Sandbox Code Playgroud)
在服务器上:
netstat -nlp | grep 5432
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 29609/postmaster
tcp 0 0 :::5432 :::* LISTEN 29609/postmaster
unix 2 [ ACC ] STREAM LISTENING 2107633273 29609/postmaster /tmp/.s.PGSQL.5432
Run Code Online (Sandbox Code Playgroud)
服务器上没有 iptables。ping 服务器成功。
我做错了什么?