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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply

Data Refresh Failed: mysql doesn't support encrypted connections

Hi,

 

I've been trying to fix this problem for a while, and I can't seem to find where the issue is.

I have a report connected to Alibaba Cloud's mysql, and everything works fine in PowerBI desktop. I refresh the report and everything is okay. But once I published it to powerbi service and tried to refresh there, I get the following error message: "Data source error: The MySql source doesn't support encrypted connections. (Source at ......). The exception was raised by the IDbCommand interface."

Currently, I am not using a data gateway, as I am aware that cloud connections don't require one. I've tried switching between encrypted and not encrypted connections, but the error remains the same regardless of which one I've switched on. I've also tried to use the on-premise data gateway instead, but I can't cuz I'm not an admin user. I am using power query to query the data with the mysql database. Here's the m query code:
MySQL.Database("rm XXXXXX", "coordination", [ReturnSingleDatabase=true])

1 ACCEPTED SOLUTION

Yes I found a solution. I have to specify for it to be non-encrypted. I do it by downloading the MySQL ODBC driver to control encryption settings.
I specified the connection string through Power Query itself. Here's the m-query code:
connectionString = "Driver={MySQL ODBC 9.0 Unicode Driver};Server=rm-XXXXX;Database=...;User=...;Option=3;SslMode=DISABLED;",
Source = Odbc.Query(connectionString, "SELECT * FROM table")

View solution in original post

10 REPLIES 10
v-jtian-msft
Community Support
Community Support

Hello, @aduguid ,thanks for your concern about this issue.

Your answer is excellent!
And I would like to share some additional solutions below.
Hi,@smallfires0628 .I am glad to help you.

Currently, when MySQL is used as a data source to connect to Power BI, this is the general problem that occurs
For you to complete the data quota in Power BI
Desktop, the syntax for My SQL should be like this:

source=MySQL.Database(server
Database(server, db, [ReturnSingleDatabase=true,CreateNavigationProperties=false,Query= sql
])


The parameters here, server should be the Aliyun server address, db should be the database on the server, and sql is the query that must be executed.
You may also need to configure SSL, generate SSL certificates and configure the MySQL server to use them!
I've found some issues that have been resolved, as well as articles that I hope will help you.
URL:

Solved: Power BI Gateway MySQL source doesn't support encr... - Microsoft Fabric Community
[solved] Power BI Gateway – MySQL source doesn’t support encrypted connections | Flowpoint
Power Query MySQL database connector - Power Query | Microsoft Learn

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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

aduguid
Super User
Super User

 

Try explicitly setting the connection string to not use SSL by adding SslMode=none; to it.

Example: Server=yourserver;Database=yourdatabase;User=youruser;Password=yourpassword;SslMode=none;

 

Can you clarify where I could do that? I am using power query to query the data. I am connecting it to the mysql database. MySQL.Database("rm XXXXXX", "coordination", [ReturnSingleDatabase=true])

MySQL.Database("rm XXXXXX", "coordination", [ReturnSingleDatabase=true, Encrypted=false, SslMode="none"])
])

I tried but it sent me the following error:

DataSource.Error: MySQL: This function doesn't support the query option 'Encrypted' with value 'false'.
Details:
FALSE

DataSource.Error: MySQL: This function doesn't support the query option 'Sslmode' with value '"none"'.
Details:
none
It seems like both parameters don't work.

 

I am working with PBI Version: 2.131.1203.0 64-bit (July 2024)

Hi @smallfires0628 

 

Have you found a solution to this? Stuck on exactly the same issue...

 

Kind regards,

Tom

Yes I found a solution. I have to specify for it to be non-encrypted. I do it by downloading the MySQL ODBC driver to control encryption settings.
I specified the connection string through Power Query itself. Here's the m-query code:
connectionString = "Driver={MySQL ODBC 9.0 Unicode Driver};Server=rm-XXXXX;Database=...;User=...;Option=3;SslMode=DISABLED;",
Source = Odbc.Query(connectionString, "SELECT * FROM table")

Thanks for your quick response @smallfires0628 !
Works in PBI Desktop.
This implies set-up of a gateway I guess?
Or how do you connect from the service?

I am using cloud connections, so no data gateway needed for that

Thanks so much for your replies.

 

Ok, I see... it's a bit confusing in the settings interface.

Screenshot 2024-11-29 at 14.52.07.png

 Details:

Screenshot 2024-11-29 at 14.52.29.png

 

Screenshot 2024-11-29 at 14.52.50.png

 


Anyway, don't know if you got the same issue but it asks for credentials and doesn't want to save after I filled them in. Also, it gives the impression of wanting to use an on-premises gateway (grayed out)...

 

What ODBC-version are you working on?
Only difference with your query is the 9.0 vs 9.1 (only one available on Oracle)

 

Screenshot 2024-11-29 at 14.22.53.png

 

 

connectionString = "Driver={MySQL ODBC 9.1 Unicode Driver};Server=my_server;Database=my_db;User=my_user;Option=3;SslMode=DISABLED;",
Source = Odbc.Query(connectionString, "SELECT * FROM items")

 

 

-> works fine in PBI Desktop

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.