MySQL database
Summary
Item | Description |
---|---|
Release State | General Availability |
Products | Excel Power BI (Datasets) Power BI (Dataflows) Fabric (Dataflow Gen2) Power Apps (Dataflows) Dynamics 365 Customer Insights Analysis Services |
Authentication Types Supported | Windows (Power BI Desktop, Excel, online service with gateway) Database (Power BI Desktop, Excel) Basic (online service with gateway) |
Function Reference Documentation | MySQL.Database |
Note
Some capabilities may be present in one product but not others due to deployment schedules and host-specific capabilities.
Prerequisites
You need to install the Oracle MySQL Connector/NET package prior to using this connector in Power BI Desktop. This component must also be installed on the machine running the on-premises data gateway in order to use this connector in Power Query Online (dataflows) or Power BI service. The MySQL connector requires the MySQL Connector/NET package to be correctly installed. To determine if the package has installed correctly, open a PowerShell window and run the following command:
[System.Data.Common.DbProviderFactories]::GetFactoryClasses()|ogv
If the package is installed correctly, the MySQL Data Provider is displayed in the resulting dialog. For example:
If the package doesn't install correctly, work with your MySQL support team or reach out to MySQL.
Capabilities Supported
- Import
- Advanced options
- Command timeout in minutes
- Native SQL statement
- Relationship columns
- Navigate using full hierarchy
Connect to MySQL database from Power Query Desktop
To make the connection, take the following steps:
Select the MySQL database option in the connector selection. More information: Where to get data
In the MySQL database dialog, provide the name of the server and database.
Select the Database authentication type and input your MySQL credentials in the User name and Password boxes.
Select the level to apply your credentials to.
Once you're done, select OK.
Note
If the connection isn't encrypted, you'll be prompted with the following dialog.
Select OK to connect to the database by using an unencrypted connection, or follow the instructions to set up encrypted connections to SQL Server.
In Navigator, select the data you require, then either load or transform the data.
Connect to MySQL database from Power Query Online
To make the connection, take the following steps:
Select the MySQL database option in the connector selection. More information: Where to get data
In the MySQL database dialog, provide the name of the server and database.
If necessary, include the name of your on-premises data gateway.
Select the Basic authentication kind and input your MySQL credentials in the Username and Password boxes.
If your connection isn't encrypted, clear Use Encrypted Connection.
Select Next to connect to the database.
In Navigator, select the data you require, then select Transform data to transform the data in Power Query Editor.
Connect using advanced options
Power Query provides a set of advanced options that you can add to your query if needed.
The following table lists all of the advanced options you can set in Power Query Desktop.
Advanced option | Description |
---|---|
Command timeout in minutes | If your connection lasts longer than 10 minutes (the default timeout), you can enter another value in minutes to keep the connection open longer. |
SQL statement | For information, go to Import data from a database using native database query. |
Include relationship columns | If checked, includes columns that might have relationships to other tables. If this box is cleared, those columns aren't included. |
Navigate using full hierarchy | If checked, the navigator displays the complete hierarchy of tables in the database you're connecting to. If cleared, the navigator displays only the tables whose columns and rows contain data. |
Once you've selected the advanced options you require, select OK in Power Query Desktop or Next in Power Query Online to connect to your MySQL database.
Feedback
Submit and view feedback for