[英]DB authentication failed - postgres
我不知道为什么收到此错误消息:
DB authentication failed:
SequelizeConnectionError: Ident authentication failed for user "smemamian"
at connection.connect.err (/home/sunyar/API/node_modules/sequelize/lib/dialects/postgres/connection-manager.js:108:24)
\\l
命令行输出:
postgres=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
sunyar | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres +
| | | | | postgres=CTc/postgres+
| | | | | sunyardb=CTc/postgres+
| | | | | smemamian=c/postgres
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
我的数据库连接变量:
DB_CONNECTION_URL = 'postgres://smemamian:123456@localhost:5432/sunyar'
默认情况下,postgres使用基于IDENT的身份验证。 因此,“身份验证失败”与pg_hba.conf配置文件有关。 在psql
命令行中,可以通过键入以下内容找到该文件:
postgres=> show hba_file;
在此处查看参考: https : //www.postgresql.org/docs/9.1/auth-pg-hba-conf.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.