# Unable to connect to Google Cloud MySql

**URL:** <https://community.fly.io/t/unable-to-connect-to-google-cloud-mysql/6511>\
**Category:** Questions / Help\
**Tags:** mysql\
**Created:** [August 22, 2022, 10:04pm UTC](https://community.fly.io/t/unable-to-connect-to-google-cloud-mysql/6511 "2022-08-22T22:04:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreday](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/dreday/32/4381_2.png) [@dreday](https://community.fly.io/u/dreday)\
**Post date:** [August 22, 2022, 10:04pm UTC](https://community.fly.io/t/unable-to-connect-to-google-cloud-mysql/6511/1 "2022-08-22T22:04:53Z")

</div>

I have a Google Cloud MySql instance which I’m able to connect to using Prisma from within my Remix.run app while running on localhost.

I’ve added the IP for my [fly.io](http://fly.io) dev site as an authorized network in my Cloud console and set the secret.

I’ve also setup a Connectivity test within Cloud console that validates the connection should be possible.

I’m not sure what I’m missing at this point…

---

<div class="post-metadata">

**Author:** ![charsleysa](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/charsleysa/32/16002_2.png) [@charsleysa](https://community.fly.io/u/charsleysa)\
**Post date:** [August 22, 2022, 11:34pm UTC](https://community.fly.io/t/unable-to-connect-to-google-cloud-mysql/6511/2 "2022-08-22T23:34:00Z")

</div>

Hi @dreday

The Anycast IP addresses assigned to your [fly.io](http://fly.io) app are for incoming connections only.  
Those IP Addresses aren’t used for outgoing connections from your [fly.io](http://fly.io) app to the internet.

---

<div class="post-metadata">

**Author:** ![dreday](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/dreday/32/4381_2.png) [@dreday](https://community.fly.io/u/dreday)\
**Post date:** [August 23, 2022, 12:17am UTC](https://community.fly.io/t/unable-to-connect-to-google-cloud-mysql/6511/3 "2022-08-23T00:17:26Z")

</div>

Thanks - can you point me to where/how I can create or obtain an IP for outgoing connections?

---

<div class="post-metadata">

**Author:** ![charsleysa](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/charsleysa/32/16002_2.png) [@charsleysa](https://community.fly.io/u/charsleysa)\
**Post date:** [August 23, 2022, 2:17am UTC](https://community.fly.io/t/unable-to-connect-to-google-cloud-mysql/6511/4 "2022-08-23T02:17:03Z")

</div>

Hi @dreday

I believe there currently is no list you can use and [fly.io](http://fly.io) recommend not relying on outgoing IP addresses as there is no guarantee they’ll stay the same.

---

<div class="post-metadata">

**Author:** ![dreday](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/dreday/32/4381_2.png) [@dreday](https://community.fly.io/u/dreday)\
**Post date:** [August 23, 2022, 12:49pm UTC](https://community.fly.io/t/unable-to-connect-to-google-cloud-mysql/6511/5 "2022-08-23T12:49:13Z")

</div>

So there’s no way then to connect to a db instance outside of [fly.io](http://fly.io)?

---

<div class="post-metadata">

**Author:** ![JP\_Phillips](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jp_phillips/32/18337_2.png) [@JP\_Phillips](https://community.fly.io/u/JP_Phillips)\
**Post date:** [August 23, 2022, 1:13pm UTC](https://community.fly.io/t/unable-to-connect-to-google-cloud-mysql/6511/6 "2022-08-23T13:13:24Z")

</div>

Hi @dreday, the currently suggested approach for accessing cloud provider managed DBs from [fly.io](http://fly.io) is to use Tailscale. They have a guide for how to setup remote access with [AWS RDS](https://tailscale.com/kb/1141/aws-rds/) and I imagine the process would be similar for GCP where you’d deploy a VM through GCE and connect it to your tailnet. Once setup on GCP, you would then setup [Tailscale on Fly.io](https://tailscale.com/kb/1132/flydotio/) and then your app can connect to the GCP MySQL over tailnet.

---

<div class="post-metadata">

**Author:** ![JP\_Phillips](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jp_phillips/32/18337_2.png) [@JP\_Phillips](https://community.fly.io/u/JP_Phillips)\
**Post date:** [August 23, 2022, 6:58pm UTC](https://community.fly.io/t/unable-to-connect-to-google-cloud-mysql/6511/7 "2022-08-23T18:58:44Z")

</div>

A similar discussion is also in [https://community.fly.io/t/how-to-connect-to-the-googlecloud-sql-through-wireguard-vpn/](https://community.fly.io/t/how-to-connect-to-the-googlecloud-sql-through-wireguard-vpn/)
