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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.