Postgres:无法从NodeJS(PG)连接到md5
Windows 10上的Node v6.2; PG(node-postgres)v4.4.2
Ubuntu 14.04上的Postgres 9.5 Trusty VirtualBox
我正在使用PG(node-postgres)模块在虚拟机上连接到Ubuntu上的Postgres。 我能够使用Navicat连接没有问题,但是当我连接NodeJS时,那些相同的凭据不起作用。 postgres日志显示这个:
xxxx@yyyy FATAL: password authentication failed for user "xxxx" xxxx@yyyy DETAIL: Connection matched pg_hba.conf line 96: "host all all all $
我添加了这行到我的pg_hba.conf
文件,现在它的工作,但任何人都可以解释为什么md5
不工作?
# I added this line: host all all all password # This line was already here: host all all all md5
Node v6有一个突破性的改变,所以你需要从你所说的v4.4.2升级“pg”(node-postgres)到v6.0.1。
- postgres中的大量数据库 – 架构最佳实践
- node-postgres:caching的参数化插入查询,在第二次运行时失败
- 如何将MySQL风格的问号`?`绑定参数转换为Postgres风格的`$ 1`绑定参数
- out参数结果由节点pg module – postgresql返回
- AWS Lambda上的节点function无法连接到具有node-pg的数据库
- postgres复合types在node-postgres上
- Node – 使用node-postgres设置Postgres驱动程序
- 什么样的对象是node-postgres错误? 为什么node的console.log和JSON.stringify以不同的方式处理它?
- node-postgres与callback或asynchronous/等待交易?