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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.