skip to Main Content

I have a public mysql db that is exposed via an IP (dev server)

I would like to access it from my app .net core that is deployed as an azure web App

I am currently not able to do so.

I can access this DB from any PC I tried so far (so db is accessible for sure).

The Web app error:

Unable to connect to any of the specified MySQL hosts

Is there any configuration needed on the web app to access the db?

I added the connection string to the web-app config

I would tear the db down after using it

2

Answers


  1. You must havé to check your rules connexion and then maybe your firewall.

    Best regards.

    Login or Signup to reply.
    • To connect your azure hosted app to your local hosted MySQL server you have to use a hybrid connection.
      Under the networking tab click on the hybrid connection:

    enter image description here

    After that click on theadd hybrid connectionand then click on the create new hybrid connection

    enter image description here

    enter image description here

    After that fill this form to create a hybrid connection

    enter image description here

    To connect your local db to azure we would need a relay this relay would be a hybrid connection manager download this hybrid connection manager from the portal

    enter image description here

    After installing the hybrid connection manager, you will get ui something like this

    enter image description here

    Click on the add new hybrid connection

    It will prompt you to login into you azure account

    enter image description here

    Select your subscriptions and then the available hybrid connection will appear.
    Select the ones you want and save.
    You are now connected to the azure app service.

    If the hybrid connection manager is showing not connected then restart the computer, it will start connecting.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search