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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Fern_21
Advocate III
Advocate III

Error connecting to a public MY SQL db on power bi service

Hi all!

I connect from Power BI Desktop to a public MySQL database with a server and database.

I publish the report to the service and get this error Failed to update data source credentials: The credentials provided for the MySql source are invalid.

Since it is public, I am not using a gateway. How can I resolve this?

Thanks

2 ACCEPTED SOLUTIONS
pankajnamekar25
Super User
Super User

Hello @Fern_21 

Power BI Service does not support anonymous access for MySQL, even if the database is public.

After publishing, go to Dataset → Settings → Data source credentials and re-enter credentials.

Use Basic authentication (username + password) and set Privacy level = Public.

Create a read-only MySQL user if needed and use those credentials.

No gateway is required as long as the MySQL server is internet-facing and port 3306 is open

 


If my response helped you, please consider clicking
Accept as Solution and giving it a Like 👍 – it helps others in the community too.


Thanks,


Connect with me on:

LinkedIn

 

View solution in original post

SaiTejaTalasila
Super User
Super User

Hi @Fern_21 ,

 

If the MySQL database is public, Power BI Service cannot refresh anonymously. To make it work:

 

Create a dedicated MySQL user with SELECT permission and allow remote access from the machine running the Service.

 

Ensure the MySQL user uses a supported authentication plugin (mysql_native_password or caching_sha2_password).

 

If using a gateway (personal or on-premises), install MySQL Connector/NET 8.x (64-bit) on the gateway machine.

 

Enter the MySQL credentials in Power BI Service → Dataset → Data source credentials.

 

Public access alone is not enough — credentials and proper connectivity are required.

 

Thanks,

Sai Teja 

View solution in original post

5 REPLIES 5
v-ssriganesh
Community Support
Community Support

Hello @Fern_21,

Hope everything’s going great with you. Just checking in has the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.

Thank you

v-ssriganesh
Community Support
Community Support

Hello @Fern_21,
Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to @SaiTejaTalasila@cengizhanarslan & @pankajnamekar25 for sharing valuable insights.

 

Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.

 

Thank you for being part of the Microsoft Fabric Community.

SaiTejaTalasila
Super User
Super User

Hi @Fern_21 ,

 

If the MySQL database is public, Power BI Service cannot refresh anonymously. To make it work:

 

Create a dedicated MySQL user with SELECT permission and allow remote access from the machine running the Service.

 

Ensure the MySQL user uses a supported authentication plugin (mysql_native_password or caching_sha2_password).

 

If using a gateway (personal or on-premises), install MySQL Connector/NET 8.x (64-bit) on the gateway machine.

 

Enter the MySQL credentials in Power BI Service → Dataset → Data source credentials.

 

Public access alone is not enough — credentials and proper connectivity are required.

 

Thanks,

Sai Teja 

cengizhanarslan
Super User
Super User

Power BI Service cannot refresh MySQL without credentials, even if the database allows anonymous connections or is publicly reachable.

 

Even for a public DB, you must:

  1. Create a read-only MySQL user

  2. Grant SELECT permissions

  3. Use that user in Power BI Service

Steps:

  1. Dataset → Settings

  2. Data source credentials

  3. Edit credentials

  4. Authentication method: Basic

  5. Enter MySQL username & password

No gateway needed if the server is internet-reachable.

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.
pankajnamekar25
Super User
Super User

Hello @Fern_21 

Power BI Service does not support anonymous access for MySQL, even if the database is public.

After publishing, go to Dataset → Settings → Data source credentials and re-enter credentials.

Use Basic authentication (username + password) and set Privacy level = Public.

Create a read-only MySQL user if needed and use those credentials.

No gateway is required as long as the MySQL server is internet-facing and port 3306 is open

 


If my response helped you, please consider clicking
Accept as Solution and giving it a Like 👍 – it helps others in the community too.


Thanks,


Connect with me on:

LinkedIn

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.