0

我是 FeathersJS 的新手并试图将其与 PostgreSQL 连接,但我在使用 SequelizeConnection 时遇到问题,它向我显示了这个错误

信息:Feathers 应用程序在 http://localhost:3030 上启动

错误:未处理拒绝:Promise {"_bitField":18087936,"_fulfillmentHandler0":{"name":"SequelizeConnectionError","parent":{"length":166,"name":"error","severity": "FATAL","code":"28P01","file":"d:\pginstaller_12.auto\postgres.windows-x64\src\backend\libpq\auth.c","line":"333","例程":"auth_failed"},"original":{"length":166,"name":"error","severity":"FATAL","code":"28P01","file":"d: \pginstaller_12.auto\postgres.windows-x64\src\backend\libpq\auth.c","line":"333","routine":"auth_failed"}},"name":"SequelizeConnectionError","parent":{"length":166,"name":"error","severity":"FATAL","code":"28P01","file":"d:\pginstaller_12.auto\ postgres.windows-x64\src\backend\libpq\auth.c","line":"333","routine":"auth_failed"},"original":{"length":166,"name":"错误","严重性":"致命","代码":"28P01","文件":"d:\pginstaller_12.auto\postgres.windows-x64\src\backend\libpq\auth.c","行":"333","例程":"auth_failed"}}文件":"d:\pginstaller_12.auto\postgres.windows-x64\src\backend\libpq\auth.c","line":"333","routine":"auth_failed"},"original":{ “长度”:166,“名称”:“错误”,“严重性”:“致命”,“代码”:“28P01”,“文件”:“d:\pginstaller_12.auto\postgres.windows-x64\src\后端\libpq\auth.c","line":"333","routine":"auth_failed"}}文件":"d:\pginstaller_12.auto\postgres.windows-x64\src\backend\libpq\auth.c","line":"333","routine":"auth_failed"},"original":{ “长度”:166,“名称”:“错误”,“严重性”:“致命”,“代码”:“28P01”,“文件”:“d:\pginstaller_12.auto\postgres.windows-x64\src\后端\libpq\auth.c","line":"333","routine":"auth_failed"}}\pginstaller_12.auto\postgres.windows-x64\src\backend\libpq\auth.c","line":"333","routine":"auth_failed"}}\pginstaller_12.auto\postgres.windows-x64\src\backend\libpq\auth.c","line":"333","routine":"auth_failed"}}

4

1 回答 1

0

此错误指定您输入无效的连接字符串以将您连接到您的 postgres 数据库。

您需要提供一个有效的连接字符串,如下所示:

postgres://user:password@host:port/db_name

在哪里 :

  • 用户:它是连接你的 postgres 数据库的用户,
  • 密码:这是用户的密码,
  • 主机:您的数据库可用的主机名(例如,“localhost”,如果 postgres 安装在本地),
  • 端口:默认端口为 5432,
  • db_name:您的数据库的名称。
于 2020-06-30T19:34:22.833 回答