How to connect Power BI to MySQL
In this blog we’ll see how to Connect Power BI to the MySQL . Before connecting to MySQL make sure you have MySQL connector install on your machine.
Follow following steps to connect to the MySQL
- Open Power BI Desktop and select Get Data > Database > MySQL Database. For example, if you have a local MySQL server running and can connect to it by entering “localhost” or name of local machine, enter name of database and press OK button.
- If you are getting error saying “DataSource.Error: Object reference not set to an instance of an object.” To resolve this issue, go to File | Options and Settings | Data source settings and edit your data source and set the credentials to “Database credentials”, not Windows credentials.
- You can get data from MySQL views, use the “SQL statement (optional)” and enter a SQL query.
- In next blog we’ll see how to connect the Power BI to MySQL if MySQL is running on the cloud.