Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This article applies to Power BI Desktop only. Currently Power Query online or Power BI Service is not supported.
With Power BI Desktop you can visually explore your data through a free-form drag-and-drop canvas, a broad range of modern data visualizations, and an easy-to-use report authoring experiences. You can import directly from the tables or import from a SELECT query. In this quickstart, you learn how to connect with Azure Database for MySQL Flexible Server with Power BI Desktop.
- Install Power BI desktop.
- If you connect with MySQL database for the first time in Power BI, you need to install the Oracle MySQL Connector/NET package.
- Skip the steps below if MySQL server has SSL disabled. If SSL is enabled, then follow the steps below to install the certificate.
- Download the SSL public certificate.
- Install the SSL certificate in Trusted Root certification authorities store by following these steps:
- Start certmgr.msc Management Console on your Windows system.
- Right-click Trusted Root Certification Authorities and select Import.
- Follow the prompts in the wizard to import the root certificate (for example, DigiCertGlobalRootCA.crt.pem) and select OK.
Get the connection information needed to connect to the Azure Database for MySQL Flexible Server instance. You need the fully qualified server name and sign in credentials.
Sign in to the Azure portal.
From the left-hand menu in Azure portal, select All resources, and then search for the server you've created (such as mydemoserver).
Select the server name.
From the server's Overview panel, Select Power BI setting from the left-hand menu.
Select a database from the dropdown list, for example contactsdb and then select Get started.
Download the Power BI desktop file contactsdb.pbids.
Open the file in Power BI desktop.
Switch to Database tab to provide the username and password for your database server. Note Windows authentication is not supported for Azure Database for MySQL Flexible Server.
In Navigator, select the data you require, then either load or transform the data.
You can connect to Azure Database for MySQL Flexible Server with Power BI desktop directly without using the Azure portal.
- Sign in to the Azure portal.
- From the left-hand menu in Azure portal, select All resources, and then search for the Azure Database for MySQL Flexible Server instance you've created (such as mydemoserver).
- Select the server name.
- From the server's Overview panel, make a note of the Server name and Server admin login name. If you forget your password, you can also reset the password from this panel.
- Go to Databases page to find the database you want to connect to. Power BI desktop supports adding a connection to a single database and hence providing a database name is required for importing data.
Select the MySQL database option in the connector selection.
In the MySQL database dialog, provide the name of the Azure Database for MySQL Flexible Server instance and database.
Select the Database authentication type and input your MySQL credentials in the User name and Password boxes. Make sure to select the level to apply your credentials to.
Once you're done, select OK.
In Navigator, select the data you require, then either load or transform the data.
A data gateway is required to use MySQL with Power BI query online. See how to deploy a data gateway for MySQL. Once data gateway is setup, take the following steps to add a new connection:
Select the MySQL database option in the connector selection.
In the MySQL database dialog, provide the name of the server and database.
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.
Power Query Desktop 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. This option is only available in Power Query Desktop. |
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, you can't see those columns. |
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 to connect to your MySQL database.