Prisma not connecting to external MySQL

I’m trying to run a nodejs app with Prisma, that should connect to an external MySQL database. I have added Fly’s ipv4 ip to the allow list of the external host, but Prisma is not able to connect to it. I guess that’s the incoming ip.

The error is:

Can't reach database server at `77.x.x.x`:`3306` (ip redacted)

I’ve double checked all ip and they are all correct, I’m guessing that as stated here, I have no way to know what outgoing ip Fly is trying to use? (reference: Connect GCP MYSQL to fly not working - #5 by greg). Is that the case, or is it something different that I should change?

Hi,

Ah, yep, it sounds like you are running into that mentioned issue:

You can’t whitelist an IP address in an external database’s firewall (such as AWS RDS or GCP CloudSQL) since you won’t know what it will be.

If your database is in GCP, you could use their Cloud proxy to get around the issue. If it’s in Fly, of course it’s not an issue. But if it’s e.g AWS RDS … not sure. Someone may have an idea in one of the threads about this e.g

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.