Node.js PostgreSQL用户没有密码的环回数据源的JSON模式是什么?
环回:我正在尝试使用以下数据源通过CentOS中的数据源文件连接到DB to API:Node.js PostgreSQL用户没有密码的环回数据源的JSON模式是什么?,node.js,angular,postgresql,loopback,Node.js,Angular,Postgresql,Loopback,环回:我正在尝试使用以下数据源通过CentOS中的数据源文件连接到DB to API: { "db": { "name": "db", "connector": "memory" }, "apidb": { "host": "localhost", "port": 5432, "url": "postgres://postgres@localhost/apidb", "database": "apidb", "password
{
"db": {
"name": "db",
"connector": "memory"
},
"apidb": {
"host": "localhost",
"port": 5432,
"url": "postgres://postgres@localhost/apidb",
"database": "apidb",
"password": "",
"name": "apidb",
"user": "postgres",
"connector": "postgresql"
}
}
我尝试了多次连接,但出现了一个错误:
Web server listening at: http://localhost:3000
Browse your REST API at http://localhost:3000/explorer
Connection fails: error: Ident authentication failed for user "postgres"
It will be retried for the next request.
events.js:183
throw er; // Unhandled 'error' event
^
error: Ident authentication failed for user "postgres"
当我输入su-postgres
时,我可以毫无问题地进入bash。我有一个db名称apidb
,我想连接到它。到目前为止,我试过:
apidb| postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres
+
| | | | | postgres=CTc/po
stgres +
我不再确定错误来自何处。帮助!要求您的操作系统用户名与您希望连接的PostgreSQL用户名匹配。如果不是这样,您需要选择其他身份验证方法,或者提供一个pg_ident.conf,将操作系统用户映射到允许的PostgreSQL用户。如果您打算如果使用ident,则它不适用于您,请查看PostgreSQL server日志文件,查看它提供的有关故障的信息