在raspberry上直接远程连接到postgresql 12

在raspberry上直接远程连接到postgresql 12,postgresql,Postgresql,我没有(直接)连接到远程raspberry上的postgresql 12数据库 我通过一个名为Postco的程序连接到它,该程序具有以下设置: host : localhost port : 5432 user : the username on the raspberry pwd : the password of the user on the raspberry Database: the name of my database SSH Host: the IP

我没有(直接)连接到远程raspberry上的postgresql 12数据库

我通过一个名为Postco的程序连接到它,该程序具有以下设置:

host    : localhost
port    : 5432
user    : the username on the raspberry
pwd     : the password of the user on the raspberry
Database: the name of my database
SSH Host: the IP of my raspberry
port    : 22
user    : the username on the raspberry
pwd     : the password of the user on the raspberry
host    : the IP of my raspberry
port    : 5432
user    : the username on the raspberry
pwd     : the password of the user on the raspberry
Database: the name of my database
所以我可以通过SSH获得访问权,但我希望获得直接访问权,因为我也希望通过python程序中的sqlAlchemy来访问它。但在那里我得到了致命的错误消息,它无法连接

那么有机会直接访问数据库吗?我是否需要在raspberry上的pg-hba.config和postgresql.config中为主机用户授予权限

所以我想进入这些设置:

host    : localhost
port    : 5432
user    : the username on the raspberry
pwd     : the password of the user on the raspberry
Database: the name of my database
SSH Host: the IP of my raspberry
port    : 22
user    : the username on the raspberry
pwd     : the password of the user on the raspberry
host    : the IP of my raspberry
port    : 5432
user    : the username on the raspberry
pwd     : the password of the user on the raspberry
Database: the name of my database

你能通过数据库机器上的psql-U用户连接吗?你能ping/telnet/nmap远程机器吗?端口54332开着吗?它对外界可见吗?是的。我可以ping机器,端口5432是开放的,外部世界可以看到它。但是我无法通过这个psql-U命令连接。但是没有密码。如果这行得通,我会很惊讶。然而,我的主机说:找不到命令。所以我可能需要在我的主机上安装psql?或者我需要设定一条路径?但我的主机上还有另一个数据库,我可以连接到这个。我还可以登录到机器上,并在那里对数据库进行psql。是的,您需要在本地机器上安装某种客户端。可以是psql,也可以是python的psycopg客户机,也可以是PHP的PDO。无论什么(顺便说一句,我从未听说过邮递公司…)谢谢!所以我要试试这个。(这是一个提供apple pretty Postgresql客户端的试验。)