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
newpi
Helper V
Helper V

No database selected error when adding option SQL statement

Hi,

 

I connected to MYSQL server using Get data > ODBC source and adding all credentials. The issue i'm facing is when I add an optional SQL statement and try to connect it is showing an error of No database selected. But without any SQL statement it is connecting fine with the server and giving me tables option to connect and load data. 
All I want to do is be able to connect to a query that I have written in MYSQL client and load that data in Power BI. It is complex query and I don't think I can achieve that in Power BI or atleast do not have the time to do it again right now.  Need help connecting and parsing that query information to power bi so that I can build on top of that.

Screen Shot 2020-05-22 at 12.39.55 PM.png

1 REPLY 1
V-pazhen-msft
Community Support
Community Support

@newpi 
I guess you should not sued ODBC source. Try use the MySQL database connector, 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).

 

Then refer to this blog to connect to MySQL in Power BI Desktop. If the connection still fails, 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.
 

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

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.