2

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?

Haukinger
  • 10,420
  • 2
  • 15
  • 28
user616
  • 783
  • 4
  • 18
  • 44

2 Answers2

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.
user616
  • 783
  • 4
  • 18
  • 44
0

It's a bug in prisma library itself, has been reported and acknowledged. You can checkout the exact issue here

1mike12
  • 2,946
  • 3
  • 27
  • 36
r_dmr
  • 154
  • 1
  • 7