gpt4 book ai didi

postgresql - 在 pgadmin 中创建新的本地服务器?

转载 作者:行者123 更新时间:2023-11-29 11:48:59 27 4
gpt4 key购买 nike

我在 Windows 上安装了 PostgreSQL 11 和 PGadmin 4。目前,我已连接到托管我所有数据的 AWS 服务器。

我想创建一个本地服务器 (localhost) 作为我可以进行实验的测试环境。不过,我似乎无法做到,堆栈上的其他类似问题也无济于事。这是我的过程:

  • 在 pgAdmin 中,右键单击“服务器”并转到“创建”>“服务器”
  • 在“创建 - 服务器”弹出框中,我输入名称:Localserver。对于“连接”,我输入 localhost。端口我保持默认'5432',db:postgres,用户名:postgres 密码:空
  • 点击保存。

  • 但是,我收到一个错误:

    Unable to connect to server:

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

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



    screenshot of error message

    我该怎么办?如果这有所作为,我是管理员。

    最佳答案

    这可能是两件事之一。

  • 您已经设置了 Postgres 服务器,但还没有调整 listen_addresses在 postgresql.conf 文件中,或
  • 您尚未在本地计算机上设置 Postgres 服务器。 (“创建服务器”有点误导,应该是“创建服务器连接”。)
  • 关于postgresql - 在 pgadmin 中创建新的本地服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53267642/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com