DBeaver localhost PostgreSQL 连接被拒绝

DBeaver localhost PostgreSQL connection refused

我刚刚在我的个人电脑上安装了 DBeaver,我正在尝试创建一个 PostgreSQL 数据库。

我在连接到数据库中输入了以下内容window:

这些值都是预先填充的默认值,所以我离开它们并单击“测试连接...”按钮。

当我单击“测试”按钮时,出现错误 window,显示 "Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections. Connection refused: connect"

我尝试设置自己的数据库名称和凭据,但得到了相同的结果。

如何在 DBeaver 中设置本地 PostgreSQL 数据库?

DBeaver 不允许设置本地 PostgreSQL 服务器或实例:它允许连接到 现有 服务器或实例。如果 PostgreSQL 实例不存在,您应该安装 PostgreSQL 二进制文件并使用 initdb.

创建一个新的数据库实例

如果您的操作系统是 Windows 10 Home,则必须使用 192.168.99.100 而不是 localhost

我也是这样,然后我想起来我没有用脚本启动postgres

从这里回答 - https://www.reddit.com/r/dbeaver/comments/fi8h0q/new_dbeaver_install_how_to_set_up_first/

Dbeaver 只是服务器的客户端。您需要先设置服务器本身。

https://www.postgresql.org/

下载并设置服务器,然后您可以使用 DBeaver 连接到它并执行您想执行的操作。