无法使用 pgx 连接到 postgres 数据库 AWS RDS
php小编子墨在使用pgx连接到Postgres数据库AWS RDS时遇到了问题。他发现无法成功建立连接,尽管他已经按照官方文档和其他资源提供的指导进行了配置。他尝试了多种方法,包括检查数据库权限、确认网络连接、修改配置文件等,但问题依然存在。他希望能够得到解决这个问题的有效方法。
问题内容
我尝试使用 github.com/jackc/pgx/v5
包在 Go 程序中连接到 AWS RDS 中的 postgres 数据库,但出现以下错误:
failed to connect to `host=xxxxx.xxxxxxx.us-east-1.rds.amazonaws.com user=golangpg database=golangpg`: server error (FATAL: database "golangpg" does not exist (SQLSTATE 3D000)) exit status 1登录后复制