Unable to connect to shinyapps.io

Hi all,

I have a application that connects my R to SQL. Below is the connection string. However when I publish this to shiyapps.io, I unable to connect

myconn <- odbcDriverConnect(connection = "Driver={SQL Server Native client 11.0};
                            server=localhost;database=NewDatabase;trusted_connection=yes;")

Below is the error I am getting. Can anyone help me deploy my application to Shinyapps.io

When your app is deployed to shinyapps.io, it runs on their servers, not in your local machine, so the app doesn't have access to your "localhost", you have to use the public IP of the sql server and make sure that the server accepts remote connections from the shinyapps.io IPs

1 Like

thanks for the suggestion