[英]PostgreSQL - Connection to localhost:"****" refused error
I am creating a project using Spring Boot in IntelliJ Idea.我正在 IntelliJ Idea 中使用 Spring Boot 创建一个项目。 I want to use PostgreSQL as a database for my project.
我想使用 PostgreSQL 作为我项目的数据库。 But I get an error that"Connection refused check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections"
但是我收到一条错误消息“连接被拒绝,请检查主机名和端口是否正确以及邮局管理员是否接受 TCP/IP 连接”
3. My database properties: 3.我的数据库属性:
4. My postgresql.conf file: 4. 我的 postgresql.conf 文件:
5. My hba.conf file: 5. 我的 hba.conf 文件:
6. The error that I get: 6. 我得到的错误:
Can you please help me to fix this issue ?你能帮我解决这个问题吗?
Did you restart PostgreSQL after changing the port number?更改端口号后是否重新启动了PostgreSQL? If not, you'll need to do that.
如果没有,你需要这样做。
If you've restarted PostgreSQL and the connection is still rejected, it may not have been able to bind to the port in question.如果您已重新启动 PostgreSQL 并且连接仍被拒绝,则它可能无法绑定到相关端口。 Check the PostgreSQL log file for clues.
检查 PostgreSQL 日志文件以获取线索。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.