首页 > 解决方案 > Vagrant Homestead 没有与 PostgresSql 连接

问题描述

在 Vagrant Homestead 中连接 psql 时,出现以下错误:

psql: error: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
 could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and 
accepting TCP/IP connections on port 5432?

任何人都可以分享一些关于在哪里查找错误的指示吗?

标签: laravelpostgresqlvagranthomestead

解决方案


连接被拒绝意味着您尝试连接的端口实际上并未打开。刚刚重新阅读文档https://laravel.com/docs/6.x/homestead#ports 所以我想在你的本地机器上尝试 54320 端口。


推荐阅读