admin管理员组文章数量:1392081
I have created a brand new nodejs project with Prism2 and Postgres 13
Postgres is on a windows VM in the same network. Im testing Prism for the first time and cannot get it to deploy the database schema at all. I cant find anything that tells me how to fix this problem.
When i run npx prisma migrate dev
all i get is Error: P1010: User 'johndoe' was denied access on the database 'db.public'
. Ive searched for this error message and cant find any resolution, what is the issue here?
I have created a brand new nodejs project with Prism2 and Postgres 13
Postgres is on a windows VM in the same network. Im testing Prism for the first time and cannot get it to deploy the database schema at all. I cant find anything that tells me how to fix this problem.
When i run npx prisma migrate dev
all i get is Error: P1010: User 'johndoe' was denied access on the database 'db.public'
. Ive searched for this error message and cant find any resolution, what is the issue here?
3 Answers
Reset to default 3Actually the problem was resolved with some changes to the Postgres config files. By default its only listening to the local IP address of the machine that its installed on. With help from this post i was able to resolve the issue.
- Made sure that the postgresql.conf
listen_addresses
was set to '*'. This was correct by default. - Made sure the pg_hba.conf
IPv4 host
was set within the range of my network. This was changed fromhost all all 127.0.0.1/32
tohost all all 192.168.1.1/24
- Restart the postgres service and now everything works as expected.
It's a bug in prisma library itself, has been reported and acknowledged. You can checkout the exact issue here
SOLVED:: i was facing the same issue ,i resolved it by allowing the connection through different path like unix socket ,ipv4 and ipv6 authentication method to "trust"in pg_hba.conf of pgsql in /var/lib.And finally restarting the postgresql service.
本文标签: javascriptPrism V2 access denied to postgres databaseStack Overflow
版权声明:本文标题:javascript - Prism V2 access denied to postgres database - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744763717a2623904.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论