How to connect with MySQL database running on local computer in windows 11

Hi All,

I have developed a shiny app and connected it with MySQL database which is running on my local computer. the app is working smoothly when I am accessing it locally. But when I deployed the app on it is unable to connect with the SQL database.
I know this is not a new question and there are several articles on it but somehow they were unable to help me.
Till now I have done the following (suggested in the articles):-

  1. Changed the bind address in the my.ini file to
  2. Change the firewall settings and allowed a new inbound rule to allow from port 3306.

What else do I need to change to make it work??

Is port 3306 in your local computer reachable remotely via a public IP? Usually, a public IP (if you have one) is assigned to your router/modem and you need to configure port forwarding in it to redirect incoming traffic to your computer.

I have assigned the selected IP address to access port 3306. But it didn't work.

Do you get any error message that can give us a clue about what might be going wrong? Your app's logs could be a good place to start looking for information.

When deploying on shinyapps.iio, I am getting the below error

2023-03-02T11:04:06.094535+00:00 shinyapps[8400868]: Listening on
2023-03-02T11:06:38.261967+00:00 shinyapps[8400868]: Warning: Error in .local: Failed to connect to database: Error: Can't connect to MySQL server on '...*' (110)
2023-03-02T11:06:38.273128+00:00 shinyapps[8400868]: 15:
2023-03-02T11:06:38.273162+00:00 shinyapps[8400868]: 13: fn
2023-03-02T11:06:38.273167+00:00 shinyapps[8400868]: 8: retry
2023-03-02T11:06:38.273171+00:00 shinyapps[8400868]: 7: connect$retryingStartServer
2023-03-02T11:06:38.273175+00:00 shinyapps[8400868]: 6: eval
2023-03-02T11:06:38.273178+00:00 shinyapps[8400868]: 5: eval
2023-03-02T11:06:38.273184+00:00 shinyapps[8400868]: 4: eval
2023-03-02T11:06:38.273187+00:00 shinyapps[8400868]: 3: eval
2023-03-02T11:06:38.273195+00:00 shinyapps[8400868]: 2: eval.parent
2023-03-02T11:06:38.273198+00:00 shinyapps[8400868]: 1: local
2023-03-02T11:22:16.545962+00:00 shinyapps[8400868]: Container event from container-7821456: stop

Are you sure you have a public IP assigned to your router? Can you connect to your MySQL server remotely using any other software? Have in mind that ISPs sometimes use a NAT3 configuration which means you share a public IP with other clients making impossible to route traffic to your server directly.

I think this is not related to shiny or but to your specific network configuration