在this tutorial之后,我尝试使用sudo su - postgres,然后使用psql连接到PostgreSQL。问题是我得到了这个错误:psql: error: could not connect to server: could not connect to server: No such file or directory我做了一些研究,发现this post解释了如何解决这个问题。我已经对此进行了研究,但我找不到解决方案,因为所有解决</em
我想通过本地的EC2连接到AWS。-hlocalhost -Upostgres -p5432 -d postgres导致此错误:
psql: error: server certificate for "tf-xxx.rds.amazonaws.com" (and 2 other names) does not match host name "localhost"
当我尝试通过psycopg2连接到我的postgres服务器时,代码如下(以“用户名”身份运行python ):我得到一个错误psycopg2.OperationalError: FATAL: Ident authentication failed for user "username"
但是当我从命令行直接运行psql(作为用户"username")时,如下所