最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Prism V2 access denied to postgres database - Stack Overflow

programmeradmin0浏览0评论

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?

Share Improve this question edited Jul 17, 2021 at 17:07 Haukinger 10.9k2 gold badges19 silver badges32 bronze badges asked Jul 15, 2021 at 20:35 user616user616 8555 gold badges19 silver badges53 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 3

Actually 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 from host all all 127.0.0.1/32 to host 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.

发布评论

评论列表(0)

  1. 暂无评论