logo

Local MySQL PowerBI Connection Guide

Prepare a DB dump from the target server

mysqldump -u username -p dbname > filename.sql

Load the DB dump locally

  1. Install MySQL https://dev.mysql.com/downloads/installer/

  2. Load DB dump to MySQL 2.1. Open MySQL Workbrench 2.2. Connect to your local MySQL server (in "MySQL Connection" section) 2.3. Click "Server" on the main tool bar 2.4. Select "Data Import" 2.5. You should see a link to the default dump folder, typically your Documents folder in a subfolder titled dumps 2.6. Click the ... and navigate to where your MySQL backup file is located, select the backup you want to load, and click OK. 2.7. The schema names in your dump should appear on the left-hand side, at the bottom. Select the schemas that need to be restored. 2.8. Select Start Import on the bottom right.

    Note: In MySQL Workbench you can recheck MySQL Connections and see on which host and port the server is running
    

Connect Power BI to the local database

  1. Install Power BI You can use the link or install it from the Microsoft store
  2. Open Power BI
  3. Select "GET DATA > MySQL database"

server - host and port, default is 127.0.0.1:3306

database - database name

Possibile errors:

  1. If you can't connect to PowerBI, check that you have mysql-connector-net installed Solution: Make sure to enable this option during the MySQL server installation.
  2. We couldn't authenticate with the credentials provided Solution: Make sure to use database credentials, not the Windows user ones