在 pgadmin 中创建新的本地服务器? [英] Create new local server in pgadmin?

查看:677
本文介绍了在 pgadmin 中创建新的本地服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have PostgreSQL 11 and PGadmin 4 installed on windows. Currently I'm connected to a AWS server which hosts all of my data.

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

I want to create a local server (localhost) as a testing environment where I can experiment. I can't seem to do it though, and the other similar questions on stack don't help. Here's what my process is:

  1. 在 pgAdmin 中,右键单击服务器"并转到创建>服务器

  1. in pgAdmin, right click 'Servers' and go Create>Server

在创建 - 服务器"弹出框中,我输入名称:Localserver.对于连接",我输入 localhost.端口我保持默认'5432',db:postgres,用户名:postgres 密码:空

On the 'Create - Server' pop up box, i type in Name: Localserver. For 'connection' I type localhost. Port I leave as default '5432', db: postgres, username: postgres password: empty

点击保存.

但是,我收到一个错误:

however, I get an error:

无法连接到服务器:

无法连接到服务器:连接被拒绝 (0x0000274D/10061)服务器是否在主机localhost"(::1) 上运行并接受端口 5432 上的 TCP/IP 连接?

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?

无法连接到服务器:连接被拒绝 (0x0000274D/10061)服务器是否在主机localhost"(127.0.0.1)上运行并接受端口 5432 上的 TCP/IP 连接?

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?

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

What should I do? I am the admin if that makes a difference.

推荐答案

这可能是两件事之一.

  1. 您已经设置了 Postgres 服务器,但尚未调整 postgresql.conf 文件中的 listen_addresses,或者

您尚未在本地计算机上设置 Postgres 服务器.(创建服务器"有点误导,应该是创建服务器连接".)

You have not set up a Postgres server on your local machine. ("Create Server" is a bit misleading, it should probably be "Create Server Connection".)

这篇关于在 pgadmin 中创建新的本地服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆