How to add shinyapp.io to my GCP SQL networks

I have written a shiny app that I am hosting on the free shinyapp.io servers. The App has a MySQL database that I hosted on Google Cloud Platform SQL. I have already added my local address IP to the list of networks and that allows the App to connect to the database when running on my lap. But when deploying it on the Shiny App servers it doesn't connect. Do you have any suggestions?

Here is my connection logic:

ch <- dbConnect(MySQL(),user='root',password='***************',
                host = '**.***.***.***', dbname = 'mydatabase')

Whitelist shinyapps.io's ip address

1 Like

Thanks a lot, that was very helpful.