Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections

刚昨天我java项目本地跑得贼六,一布置到服务器上之后就报:Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections,
网上搜了半天说什么防火墙啊,账号密码错误啥的原因,全都是瞎扯淡;

后来和老大反应说这个postgresql连不上,老大说postgresql加个白名单就好了,这我才想起来 公司为了保险起见,在使用 postgresql 的时候设置了限制,只有拥有了psql账户密码 和 加入了psql的白名单才可以成功连接psql,本地是因为之前就已经设置过了所以才可以运行。

发布了75 篇原创文章 · 获赞 25 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/gghhm/article/details/103432945