直接远程连接到树莓派上的PostgreSQL 12

时间:2019-11-06 15:31:47

标签: postgresql

我没有与远程树莓派上的Postgresql 12数据库的(直接)连接。

我确实通过一个名为Postico的程序通过以下设置与它建立了连接:

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

所以无论如何我都可以通过SSH访问,但是我想直接访问,因为我也想通过python程序中的sqlAlchemy访问它。但是我收到了致命错误消息,提示它无法连接。

是否有机会直接访问数据库?我是否需要在树莓派的pg-hba.config和postgresql.config中为我的主机用户提供权限?

所以我想进入这些设置:

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

0 个答案:

没有答案