Forum Discussion
Issues connecting to MySQL database server using virtual network data gateway in Fabric
Hello,
I would like to create a data pipeline in Fabric which directly fetches data from a MySQL database hosted on the servers of a provider. In Microsoft Azure, I have created a Virtual Network within which I have created a Subnet with an IP range that I have asked the database provider to whitelist which they have confirmed.
I have installed MySQL workbench on a VM connected to that Subnet, and have been able to connect to and write queries against the MySQL database to confirm that the whitelisting and connection do indeed work.
When I am going to create a connection to the MySQL database in Fabric, I first create a Virtual Network Data Gateway using the Virtual Network and associated Subnet created. Thereafter, I try to establish a connection from 'Connections'. I select connection type to be 'Virtual Network', select the gateway cluster name to be my Subnet with the whitelisted IP range, pick connection type to 'MySQL', and provide my server name, database name, user name and password.
In return, however, I am prompted with: "Unable to create connection for the following reason: Unable to connect to the data source. Either the data source is inaccessible, a connection timeout occurred, or the data source credentials are invalid. Please verify the data source configuration and contact a data source administrator to troubleshoot this issue."
I don't have an idea where the issues lies as I have already confirmed that it is possible to connect to the MySQL database from a VM in the same Virtual Network and Subnet. Any guidance around this would be much appreciated. Thanks!
Kind regards,
Bertan
- Anonymous1 year ago
I managed to connect to connect to the external MySQL server using a Self-hosted Integration Runtime with a static IP address in Azure Data Factory. No luck in doing it in Fabric. I have not been able to raise a support ticket as I for some reason do not had access to do so.
16 Replies
- lbendlinSuper User
Another option would be to spin up a regular gateway in the same subnet and use that instead. More maintenance for you though.
- AnonymousNot applicable
No luck with an on-premises data gateway either unfortunately, if that is what you mean by a 'regular gateway'. What is strange is that I create a VM with a static reserved IP which I whitelist at the database provider. From the VM, I am able to connect to the MySQL database using MySQL Workbench. But when attempting to create a connection using my on-prem data gateway in Fabric, I receive the error: "Unable to create connection for the following reason: Unable to connect to the data source. Either the data source is inaccessible, a connection timeout occurred, or the data source credentials are invalid. Please verify the data source configuration and contact a data source administrator to troubleshoot this issue"
I have confirmed that the data source credentials are indeed valid. It is very hard at this point to identify the exact issue, but I believe it is related to Fabric using a dynamic outbound IP address. Anyone have anymore input on my connection issues?
- AnonymousNot applicable
Hi Anonymous ,
Thanks for reaching out to the Microsoft fabric community forum.
We really appreciate your detailed explanation. Since you verified that you can connect successfully from a VM in the same Virtual Network and Subnet, the issue is likely related to Fabric’s Virtual Network Data Gateway or Fabric’s ability to reach the database.
Here are the possible causes of the issue:
- Although the VM can access the MySQL database, the Virtual Network Data Gateway might be using a different subnet or IP range that is not whitelisted by the MySQL provider. The provider may need to whitelist additional Fabric-related IPs.
- The MySQL database provider may have firewall rules that allow only certain client types or sources. Fabric’s Virtual Network Gateway may use a different connection mechanism than a VM, which could be causing the block.
- Fabric might not support some MySQL authentication mechanisms that work on the VM. Verify if the database requires SSL/TLS, and ensure the correct SSL certificates are provided during the Fabric connection setup.
- Fabric’s Virtual Network Data Gateway does not use public IPs to connect but utilizes the configured Virtual Network. Any private endpoint restrictions could be blocking Fabric from connecting to MySQL.
- By default, MySQL uses port 3306, but some providers block external access to this port unless explicitly allowed. The provider may need to open this port.
I hope my suggestions give you good ideas, if you need any further assistance, feel free to reach out.
If this post helps, then please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Thank you.
- AnonymousNot applicable
Hello Anonymous ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.- AnonymousNot applicable
Hello Anonymous ,
I wanted to follow up on our previous suggestions regarding the issue. We would love to hear back from you to ensure we can assist you further.
If my response has addressed your query, please accept it as a solution and give a ‘Kudos’ so other members can easily find it. Please let us know if there’s anything else we can do to help.
Thank you.
- xPJRxNew Member
Having exact same issue wit Connecting Fabric to a MYSQL DB.
setting up an ODBC connection using MYSQL drivers on the server that the on-prem Fabrics data gateway is hosted on, connects to the MYSQL DB fine and can see tables etc.
Creating a connection in MS FAbric does not work, using MYSQL as the connection type and providing the EXACT same credentials to connect.
Fabric gives a connection error, Server inaccessible or user credentials incorrect.