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
pat8jan
Regular Visitor

Native SQL on MySQL database in Dataflow

Hi,

 

I have a problem using Native SQL when connecting to MySQL database in Dataflow. When i tried to create Dataflow i chose Blank Query and used this statement:

let
Source = MySql.Database("XXX.XXX.XX.XX:XXXX", "abcd", [Query = "select * from abcd.document"])
in
Source

When trying to run this I'm getting error message: 
"The import MySql.Database matches no exports. Did you miss a module reference?"

Anyone knows why it's not working. 

Additional info there is a gateway configured on server with the database. Credentials used for connecting have rights to run queries in the database. When using MySQL connector and choosing same table there's no problem.
 
I'm trying to solve it cause i need to run more complex query that also doesn't work.
1 ACCEPTED SOLUTION

There's no problem with gateway accessing the database or any connection problem. I can use MySQL source in Dataflow and import tables. I just cannot use native sql to import data based on written query.

Update:
It started working on it's own without any changes on my side.

View solution in original post

4 REPLIES 4
V-lianl-msft
Community Support
Community Support

Hi @pat8jan ,
 
Before you can connect to a MySQL database, you need to install MySQL Connector/Net 6.6.5 for Microsoft Windows on your computer. Select the driver that matches your Power BI Desktop installation (32-bit or 64-bit).
 
After installing the MySQL connector, refer to this blog to connect to MySQL in Power BI Desktop.
 
If the connection still fails in Power BI Desktop, please check that if you are able to connect to the MySQL database in MySQL workbench, ensure that MySQL workbench is installed in the same machine as Power BI Desktop.
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Unfortunately my problem is not within Power BI desktop but Dataflow in Power BI Service.

Hi. You have to try Lian solution on the server. Install the MySQL driver on the VM that contains the Gateway. That is how DataFlow will discover the datasource.

 

Regards,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

There's no problem with gateway accessing the database or any connection problem. I can use MySQL source in Dataflow and import tables. I just cannot use native sql to import data based on written query.

Update:
It started working on it's own without any changes on my side.

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
Top Kudoed Authors