无法在pgAdmin 4上查询数据,但可以在psql和Python上使用 [英] Can't query data on pgAdmin 4 but it works using psql and Python

查看:324
本文介绍了无法在pgAdmin 4上查询数据,但可以在psql和Python上使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在rds上创建了一个postgresql数据库,可以在终端上使用psql或在Python上使用sqlalchemy进行连接和查询.使用pgAdmin4时,我无法查询或可视化数据,但可以创建/更改表,导入数据,...

I have created a postgresql database on rds and I can connect and query it using psql on terminal or sqlalchemy on Python. When using pgAdmin4 I can't query or visualize the data but can create/alter tables, import data, ...

我也尝试将其连接到Metabase和DBeaver,但是连接超时.

I have also tried connecting it to Metabase and DBeaver but the connection times out.

有任何想法为什么会发生这种情况?

Any ideas why this is happening?

我还使用pgAdmin3连接了数据库,并且能够可视化数据并对其进行查询,但是由于我使用的是Postgresql 11.4,因此pgAdmin3并不完全支持它.

I have also connected the database using pgAdmin3 and was able to visualize the data and query it, but since I am using postgresql 11.4 it is not fully supported by pgAdmin3.

当我在pgAdmin 4上打开查询工具时,收到以下消息:

When I open the query tool on pgAdmin 4 I get this message:

无法将数据发送到服务器.套接字未连接无法发送 启动包:未连接套接字.

could not send data to server. Socket is not connected could not send startup packet: Socket is not connected.

推荐答案

对我有帮助: 将连接设置中的本地主机"更改为"127.0.0.1"

Helped me: changing 'localhost' in connection settings to '127.0.0.1'

这篇关于无法在pgAdmin 4上查询数据,但可以在psql和Python上使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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