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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Shailesh
Frequent Visitor

Connection string for Azure My SQL Database connection with power BI

How can we connect to Microsoft Azure My SQL Database?

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

Hi @Shailesh,

I make a test using Power BI Desktop to connect to Azure MySQL database, we can directly connect to the database using Get Data->MySQL database option. Enter Server name and database name in the first screenshot, then choose Database authentication, enter username and password in the second screenshot.
1.png2.PNG

You can check connection string(Server name, database name, username, password) of Azure MySQL database in Azure Portal following the instructions in this blog.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
v-yuezhe-msft
Employee
Employee

Hi @Shailesh,

I make a test using Power BI Desktop to connect to Azure MySQL database, we can directly connect to the database using Get Data->MySQL database option. Enter Server name and database name in the first screenshot, then choose Database authentication, enter username and password in the second screenshot.
1.png2.PNG

You can check connection string(Server name, database name, username, password) of Azure MySQL database in Azure Portal following the instructions in this blog.

Thanks,
Lydia Zhang

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

In this way, it's not possible to use schedule refresh right? I would like to use the schedule refresh without having the gateway because it's all Azure.

 

Best,

Valter

Anonymous
Not applicable

Hi Valter, I had a discussion with Microsoft support a while back about this subject and they told me it is not possible without the gateway connection even though it is all Azure. So you are correct on the scheduled refresh part indeed. This was very irritating for me as well, but basically, there are two options, at least that I know of.

Option 1: Setup an on-premises gateway compliant VM and tie your Azure MySQL into it using VNet. Possibly schedule the VM to only be turned on when you refresh. Then set up the connection through that. I have not used this implementation but I was told that it should be the workaround.

Option 2: Build your migration or data transfer to another database such as corresponding type Azure SQL Server, which supports the connection Power BI without having to use the gateway in between.

I had the choice of going with option 2, but in case you have a big infrastructure already working on top of that MySQL DB I would go with option 1 or building a pipeline from Azure MySQL to Azure SQL Server which is less than optimal. I don't know what could be the reason for this way of implementation, maybe something related to MySQL architecture, but never the less there is no option for direct connection at this stage, unfortunately.

Thanks, Leeroy for the quick reply. 😉

 

Now I know. I also prefer the second solution (It make more sense in the long run). 

 

Thanks again for the help 😉

That is not the experience we're getting today.  I'm being prompted to install other components and constantly fail connecting to Azure for MySQL.  Very frustrating to connect to Azure for MySQL with Power BI or Dataflows at the moment...

 

The links to the components are broken, pointig to 32 bit instead of 64bit, the process is complex and messy... please fix.

 

VFXPro_0-1625840189312.png

 

Anonymous
Not applicable

I just tested this today, and this experience is still valid but in order for it to work you need to install Oracle MySQL Connector/NET --> https://dev.mysql.com/downloads/connector/net/
After this, you should be able to connect as described in this post.

If you are hesitant to use the link I provided it is also listed under Microsoft's own documentation here: https://docs.microsoft.com/en-us/power-query/connectors/mysqldatabase

Thanks @v-yuezhe-msft Now I'm able to connect.

Greg_Deckler
Super User
Super User

I haven't used an Azure My SQL database but for an Azure SQL Database, in the Azure Portal you can get the Connection String information from there. Is this running as SaaS or IaaS?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors