Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
help1212
New Member

Trouble importing data from mysql

Hi I'm having issues importing data from mysql to power bi desktop. It asked for the server name which I wasn't even sure of but thought it might be localhost:3306? It's then asking for window credentials to access the database. I don't know what I'm supposed to put as the username/password. 

1 ACCEPTED SOLUTION

Hi @help1212 , Thank you for reaching out to the Microsoft Fabric Community Forum.

 

Make sure the MySQL service is running on your machine and that you can sign in directly using a tool like MySQL Workbench or the command line. If that direct login fails, fix the account before testing in Power BI. Next, install the correct MySQL Connector that matches your Power BI Desktop version (found under File -> About). Most people use the 64-bit edition of Power BI, so install the 64-bit version of either Connector/NET or Connector/ODBC. After installing, restart Power BI so it detects the new driver.

 

If Power BI still reports an authentication problem, open MySQL as an administrator and adjust the login to use a compatible authentication plugin. Run this command:

ALTER USER 'powerbi'@'localhost'
IDENTIFIED WITH mysql_native_password BY 'StrongPassword1!';
FLUSH PRIVILEGES;

 

Then reconnect in Power BI using Server = localhost:3306, Authentication = Database, and the username and password you just confirmed. Once the connector is installed, the service is reachable and the login works at the MySQL level, Power BI should establish a connection without further prompts.

 

Also, please refer below document:

Power Query MySQL database connector - Power Query | Microsoft Learn

View solution in original post

9 REPLIES 9
v-hashadapu
Community Support
Community Support

Hi @help1212 , Hope you're doing okay! May we know if it worked for you, or are you still experiencing difficulties? Let us know — your feedback can really help others in the same situation.

Hi I still haven't been able to figure it out. I tried creating a new user/password and still won't work 

Hi @help1212 , Thank you for reaching out to the Microsoft Fabric Community Forum.

 

Make sure the MySQL service is running on your machine and that you can sign in directly using a tool like MySQL Workbench or the command line. If that direct login fails, fix the account before testing in Power BI. Next, install the correct MySQL Connector that matches your Power BI Desktop version (found under File -> About). Most people use the 64-bit edition of Power BI, so install the 64-bit version of either Connector/NET or Connector/ODBC. After installing, restart Power BI so it detects the new driver.

 

If Power BI still reports an authentication problem, open MySQL as an administrator and adjust the login to use a compatible authentication plugin. Run this command:

ALTER USER 'powerbi'@'localhost'
IDENTIFIED WITH mysql_native_password BY 'StrongPassword1!';
FLUSH PRIVILEGES;

 

Then reconnect in Power BI using Server = localhost:3306, Authentication = Database, and the username and password you just confirmed. Once the connector is installed, the service is reachable and the login works at the MySQL level, Power BI should establish a connection without further prompts.

 

Also, please refer below document:

Power Query MySQL database connector - Power Query | Microsoft Learn

Hi @help1212,

 

Just wanted to follow up and confirm that everything has been going well on this. Please let me know if there’s anything from our end.
Please feel free to reach out Microsoft fabric community forum.

Thank you.

v-hashadapu
Community Support
Community Support

Hi @help1212 , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.

Ritaf1983
Super User
Super User

Hi @help1212 

Power BI does not connect to MySQL using Windows credentials. You need to use the MySQL username and password that are defined inside the database (for example, root or another user created in MySQL).

  • Server – If the database is on your local machine, the server name is usually localhost or 127.0.0.1, and the default port is 3306 (so you can enter localhost:3306). If it’s hosted elsewhere, you’ll need the actual hostname or IP address of the MySQL server.

  • Authentication – Choose Database, not Windows.

  • Username / Password – Enter the MySQL user credentials (not your Windows login).

This is the same for any licensed database system: the authentication is not for Power BI itself, but for accessing the database.

Also note: you must install the MySQL Connector/ODBC on your machine for Power BI to connect successfully

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you for replying. How do I find out what my MYSQL user credentials are? 

Hi @help1212 , Thank you for reaching out to the Microsoft Fabric Community Forum.

 

When you install MySQL, a root user is created and you’re usually asked to set a password during setup. That’s the credential Power BI is asking for. If you’re not sure what it is, try logging into MySQL directly from Command Prompt or MySQL Workbench using mysql -u root -p. If you don’t know the password, you’ll need to reset it.

 

Once you’re in, you can either use the root account or create a dedicated user for Power BI: CREATE USER 'powerbi'@'localhost' IDENTIFIED BY 'yourpassword';GRANT ALL PRIVILEGES ON yourdatabase.* TO 'powerbi'@'localhost';
FLUSH PRIVILEGES;

 

Then, in Power BI, connect with server = localhost:3306, authentication = Database, and the username/password you just confirmed or created.

 

If this isn’t your own setup and the database is hosted elsewhere, the simplest way is to ask whoever manages the MySQL server for the right login details.

Royel
Solution Sage
Solution Sage

HI @help1212 

Before tring to connect with Power BI, you need to ensure you can connect your server. If its your local server you can easily reset the root password. Then best wey is to create a user and ensure you can query in required database with you new user. 

Helping video to create a new user Link

Now, you can use newly created user and password to connect with power bi desktop. 

 

However, If you want to connect to Service you need to take help from On-premises data gateway

 

Thank you. 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors