Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
beryil
Frequent Visitor

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

13 REPLIES 13
v-tsaipranay
Community Support
Community Support

Hi @beryil ,

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. 

Hello @beryil ,


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.

Hello @beryil ,

 

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.

Hi!

 

Unfortunately, the connection issue still exists, and the advice given has not been able to resolve the issue. I have confirmed that port 3306 is open. When I troubleshoot the network in Fabric, I can see that the source adress indeed is an adress in my whitelisted subnet address range, and the remote adress is the adress of the MySQL database. However, the TCP test and ping still both fail.

 
What I feel most unsure about whether the issue exists on the Azure/Fabric side, or whether it is the server provider who has some security measure preventing my connection attempts.

Hello @beryil ,

 

Thank you for the update! Since the source address matches the whitelisted subnet but both the TCP test and ping fail, the issue is most likely on the MySQL provider’s side. Please confirm with the provider if they block ICMP (ping) or TCP connection probes from external services like Azure, as some providers restrict such requests for security reasons.

Additionally, verify if the provider enforces SSL/TLS connections and ensure the correct certificates are provided during the connection setup in Fabric. It is also worth checking if the provider allows connections only from specific client types or if they block requests from cloud-based services like Azure. If everything seems correctly configured, request the provider to check their firewall logs for any blocked connection attempts.

 

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. 

Hello @beryil ,


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.

Hello @v-tsaipranay ,

 

Unfortunately still no solution, and I have given the hopes of connecting to the database using a VNet Data Gateway in Fabric. Instead, I am now trying fetch data from the MySQL database using Azure Data Factory. I plan to ask a new question related to this approach as it also has some issues.

Hello @beryil,

 

Thank you for confirming. We apologize for the inconvenience caused by the ongoing issue.

To address this effectively, please raise a support ticket with Microsoft. This will enable the engineering team to investigate the issue in detail and provide a resolution or guidance.


To raise a support ticket for Fabric and Power BI, kindly follow the steps outlined in the following guide:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn

 

Thank you for being a part of the Microsoft Fabric Community.

 

Hi @beryil ,

 

Could you please confirm if you had raised  a support case? If a solution has been found, it would be greatly appreciated if you could share your insights with the community. This would be helpful for other members who may encounter similar issues.

 

Thank you for your understanding and assistance.

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.

Hi @beryil ,

 

To raise a support ticket, please open the Microsoft Fabric app and click on the question mark symbol (?) to select “Get Microsoft Help” as illustrated below.

vtsaipranay_0-1742551998512.jpeg

 

 

From there, you can follow the guided steps to submit your issue.

vtsaipranay_1-1742551998514.jpeg

 

 

 

Alternatively, you can use the link below to raise a support ticket:

https://admin.powerplatform.microsoft.com/newsupportticket/powerbi

 

If you face any issues, feel free to reach out to us. We're here to help!

 

Thank you for using Microsoft Community Forum.

 

lbendlin
Super User
Super User

Another option would be to spin up a regular gateway in the same subnet and use that instead.  More maintenance for you though.

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? 

Helpful resources

Announcements
MarchFBCvideo - carousel

Fabric Monthly Update - March 2025

Check out the March 2025 Fabric update to learn about new features.

"); $(".slidesjs-pagination" ).prependTo(".pagination_sec"); $(".slidesjs-pagination" ).append("
"); $(".slidesjs-play.slidesjs-navigation").appendTo(".playpause_sec"); $(".slidesjs-stop.slidesjs-navigation").appendTo(".playpause_sec"); $(".slidesjs-pagination" ).append(""); $(".slidesjs-pagination" ).append(""); } catch(e){ } /* End: This code is added by iTalent as part of iTrack COMPL-455 */ $(".slidesjs-previous.slidesjs-navigation").attr('tabindex', '0'); $(".slidesjs-next.slidesjs-navigation").attr('tabindex', '0'); /* start: This code is added by iTalent as part of iTrack 1859082 */ $('.slidesjs-play.slidesjs-navigation').attr('id','playtitle'); $('.slidesjs-stop.slidesjs-navigation').attr('id','stoptitle'); $('.slidesjs-play.slidesjs-navigation').attr('role','tab'); $('.slidesjs-stop.slidesjs-navigation').attr('role','tab'); $('.slidesjs-play.slidesjs-navigation').attr('aria-describedby','tip1'); $('.slidesjs-stop.slidesjs-navigation').attr('aria-describedby','tip2'); /* End: This code is added by iTalent as part of iTrack 1859082 */ }); $(document).ready(function() { if($("#slides .item").length < 2 ) { /* Fixing Single Slide click issue (commented following code)*/ // $(".item").css("left","0px"); $(".item.slidesjs-slide").attr('style', 'left:0px !important'); $(".slidesjs-stop.slidesjs-navigation").trigger('click'); $(".slidesjs-previous").css("display", "none"); $(".slidesjs-next").css("display", "none"); } var items_length = $(".item.slidesjs-slide").length; $(".slidesjs-pagination-item > button").attr("aria-setsize",items_length); $(".slidesjs-next, .slidesjs-pagination-item button").attr("tabindex","-1"); $(".slidesjs-pagination-item button").attr("role", "tab"); $(".slidesjs-previous").attr("tabindex","-1"); $(".slidesjs-next").attr("aria-hidden","true"); $(".slidesjs-previous").attr("aria-hidden","true"); $(".slidesjs-next").attr("aria-label","Next"); $(".slidesjs-previous").attr("aria-label","Previous"); //$(".slidesjs-stop.slidesjs-navigation").attr("role","button"); //$(".slidesjs-play.slidesjs-navigation").attr("role","button"); $(".slidesjs-pagination").attr("role","tablist").attr("aria-busy","true"); $("li.slidesjs-pagination-item").attr("role","list"); $(".item.slidesjs-slide").attr("tabindex","-1"); $(".item.slidesjs-slide").attr("aria-label","item"); /*$(".slidesjs-stop.slidesjs-navigation").on('click', function() { var itemNumber = parseInt($('.slidesjs-pagination-item > a.active').attr('data-slidesjs-item')); $($('.item.slidesjs-slide')[itemNumber]).find('.c-call-to-action').attr('tabindex', '0'); });*/ $(".slidesjs-stop.slidesjs-navigation, .slidesjs-pagination-item > button").on('click keydown', function() { $.each($('.item.slidesjs-slide'),function(i,el){ $(el).find('.c-call-to-action').attr('tabindex', '-1'); }); var itemNumber = parseInt($('.slidesjs-pagination-item > button.active').attr('data-slidesjs-item')); $($('.item.slidesjs-slide')[itemNumber]).find('.c-call-to-action').attr('tabindex', '0'); }); $(".slidesjs-play.slidesjs-navigation").on('click', function() { $.each($('.item.slidesjs-slide'),function(i,el){ $(el).find('.c-call-to-action').attr('tabindex', '-1'); }); }); $(".slidesjs-pagination-item button").keyup(function(e){ var keyCode = e.keyCode || e.which; if (keyCode == 9) { e.preventDefault(); $(".slidesjs-stop.slidesjs-navigation").trigger('click').blur(); $("button.active").focus(); } }); $(".slidesjs-play").on("click",function (event) { if (event.handleObj.type === "click") { $(".slidesjs-stop").focus(); } else if(event.handleObj.type === "keydown"){ if (event.which === 13 && $(event.target).hasClass("slidesjs-play")) { $(".slidesjs-stop").focus(); } } }); $(".slidesjs-stop").on("click",function (event) { if (event.handleObj.type === "click") { $(".slidesjs-play").focus(); } else if(event.handleObj.type === "keydown"){ if (event.which === 13 && $(event.target).hasClass("slidesjs-stop")) { $(".slidesjs-play").focus(); } } }); $(".slidesjs-pagination-item").keydown(function(e){ switch (e.which){ case 37: //left arrow key $(".slidesjs-previous.slidesjs-navigation").trigger('click'); e.preventDefault(); break; case 39: //right arrow key $(".slidesjs-next.slidesjs-navigation").trigger('click'); e.preventDefault(); break; default: return; } $(".slidesjs-pagination-item button.active").focus(); }); }); // Start This code is added by iTalent as part of iTrack 1859082 $(document).ready(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); $("#tip2").attr("aria-hidden","true").addClass("hidden"); $(".slidesjs-stop.slidesjs-navigation, .slidesjs-play.slidesjs-navigation").attr('title', ''); $("a#playtitle").focus(function(){ $("#tip1").attr("aria-hidden","false").removeClass("hidden"); }); $("a#playtitle").mouseover(function(){ $("#tip1").attr("aria-hidden","false").removeClass("hidden"); }); $("a#playtitle").blur(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); }); $("a#playtitle").mouseleave(function(){ $("#tip1").attr("aria-hidden","true").addClass("hidden"); }); $("a#play").keydown(function(ev){ if (ev.which ==27) { $("#tip1").attr("aria-hidden","true").addClass("hidden"); ev.preventDefault(); return false; } }); $("a#stoptitle").focus(function(){ $("#tip2").attr("aria-hidden","false").removeClass("hidden"); }); $("a#stoptitle").mouseover(function(){ $("#tip2").attr("aria-hidden","false").removeClass("hidden"); }); $("a#stoptitle").blur(function(){ $("#tip2").attr("aria-hidden","true").addClass("hidden"); }); $("a#stoptitle").mouseleave(function(){ $("#tip2").attr("aria-hidden","true").addClass("hidden"); }); $("a#stoptitle").keydown(function(ev){ if (ev.which ==27) { $("#tip2").attr("aria-hidden","true").addClass("hidden"); ev.preventDefault(); return false; } }); }); // End This code is added by iTalent as part of iTrack 1859082