I am trying to create a connection to Google Cloud SQL using a proxy with a key but the format of the connection string is giving me problems.
Is there anyone that has done this before that can provide me with some guidance?
I used the code below but can't workout where to include the proxy with the key? Think this is a stupid question but would like to get it to work as part of my data flow pipeline.
Where do I include the proxy and the key in the example as part of the documentation included below?
Load the DBI library
library(DBI)
Helper for getting new connection to Cloud SQL
getSqlConnection <- function(){
con <-
dbConnect(
RMySQL::MySQL(),
username = 'username',
password = 'password',
host = '127.0.0.1',
dbname = 'example'
) # TODO: use a configuration group group = "my-db")
return(con)
}