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 before using this connector in Power BI Desktop. For Power Query Online (dataflows) or Power BI service, if your MySQL server isn't cloud accessible and an on-premises data gateway is needed, the component Oracle MySQL Connector/NET must also be correctly installed on the machine running the on-premises data gateway. To determine if the package is installed correctly, open a PowerShell window and run the following command:
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.
Note
The MySQL connector isn't supported on the Personal Mode of the on-premises data gateway. It's only supported on the on-premises data gateway (standard mode)
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. For more information, go to 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.
If the connection isn't encrypted, you're 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. For more information, go to Where to get data.
In the MySQL database dialog, provide the name of the server and database.
If the MySQL server isn't accessible from the cloud, include the name of your on-premises data gateway (personal mode isn't supported).
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 time-out), you can enter another value in minutes to keep the connection open longer.
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 select the advanced options you require, select OK in Power Query Desktop or Next in Power Query Online to connect to your MySQL database.
Limitations
The following limitations apply to the Power Query MySQL database connector.
MySQL connections can't be used with personal gateways
If the MySQL database isn't accessible from the cloud, configure MySQL on-premises connections by upgrading to a standard mode on-premises data gateway instead of using a personal on-premises data gateway. For cloud-based MySQL servers, a gateway isn't required.
It isn't possible to mashup MySQL on-premises data with R and Python
For cases where Python or R is used with a MySQL database on-premises connection, use one of the following methods:
Make the MySQL server database accessible from the cloud.
Move the MySQL on-premises data to a different dataset and use the Enterprise Gateway exclusively for that purpose.
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.