MySQL, Power BI Desktop Tool, Power BI Personal Gateway
Purpose of the setup:
MySQL is one of the popular open source database used right after Microsoft SQL and Oracle. Power BI being one of the most powerful tool used for reporting and data visualization with different data sources supported.
Here we will be looking on how to connect and refresh on-premise MySQL database to Power BI.
Steps for establishing connectivity between MySQL and Power BI:
- Here we have one database created in MySQL named ‘emp_details’ which has table-‘emp_salary’ with 4 records.
- Now, we will pull this MySQL data to Power BI and create a .pbix file
- For that first we will open Power BI Desktop tool and click on Get Data
- Here we will select ‘Database’ option on the right hand side and then select the ‘MySQL Database’ and click on ‘Connect’
- Then it will ask for server name and database. Enter the appropriate server name and database (which you want). And then click OK.
- Now, it will ask for the username and Password. Then click on Connect
- Now the list of all database and its related table will appear. You select your required table and click on Load.
- Now, create a report in Power BI Desktop tool and save it with some appropriate name.
- Then, login to Power BI online and using GetData option pull the .pbix file you have created.
- You will find the .pbix file under Dataset on left hand side of the screen. Now, create a simple report and pin it to dashboard.
- Then schedule Refresh and click to Apply.
- Now when we select the Dataset and click on Refresh Now , will get
- Now, to check the Refreshing of data add a new data or update the Existing one in your MySQL table.
- Now, again go to Power BI Online and click on the Dataset and select Refresh Now .
- You will find the changes reflected on your dashboard.
You can read more about scheduling on-premise data sources in our previous blog given below: