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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Refresh Issue

Hi Everyone,

 

Source of data is MySQL and I'm using on premise gateway.
I am facing refresh issue in Power BI service from past 3 days, I am able to refresh data manually i.e from Power BI desktop but my schedule refresh is failing.I even restarted my gateway but I'm still facing this issue. 

Below is my error:

Underlying error code:-2147467259
Underlying error message:MySQL: Fatal error encountered during command execution.
DM_ErrorDetailNameCode_UnderlyingHResult:-2147467259
Microsoft.Data.Mashup.ValueError.DataSourceKind:MySql
Microsoft.Data.Mashup.ValueError.DataSourcePath:ls-a91a28979dae1c85e5448ca8499c06464b5b0997.c7jfytqdonry.eu-west-2.rds.amazonaws.com;halsa_read_replica
Microsoft.Data.Mashup.ValueError.ErrorCode:-2147467259
Microsoft.Data.Mashup.ValueError.Message:Fatal error encountered during command execution.
Microsoft.Data.Mashup.ValueError.Reason:DataSource.Error
Cluster URI:WABI-UK-SOUTH-B-PRIMARY-redirect.analysis.windows.net
Activity ID:1c5103b8-53cf-40e6-9b7b-b87577b79387
Request ID:a8862e84-7ac9-4641-be8e-c13aa4ce394c
Time:2022-06-15 04:51:37Z

 

Kindly help.

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

By my research, the error is mainly related to the SQL code, you can try the below suggestion:

1. If you set a variable within your query, you need to put it single quotes. Instead of saying @sql, use @'sql'.

   Reference: asp.net - Can you use MySQL @ session variables in the C# connector? - Stack Overflow

2. The operator doesn't be used correctly. For instance, MySQL doesn't use "==" as an equality operator: it uses the       SQL standard "=" instead.

   Reference: MySQL :: MySQL 8.0 Reference Manual :: 12.4.2 Comparison Functions and Operators

3. Adding Allow User Variables = True to the database connection;

   Adding ConnectionTimeout and default command timeout in connection.

  Reference: mysql - "Fatal error encountered during command execution"  - Stack Overflow

 

Hope it helps!

 

Best Regards,
Community Support Team _ kalyj

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

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

By my research, the error is mainly related to the SQL code, you can try the below suggestion:

1. If you set a variable within your query, you need to put it single quotes. Instead of saying @sql, use @'sql'.

   Reference: asp.net - Can you use MySQL @ session variables in the C# connector? - Stack Overflow

2. The operator doesn't be used correctly. For instance, MySQL doesn't use "==" as an equality operator: it uses the       SQL standard "=" instead.

   Reference: MySQL :: MySQL 8.0 Reference Manual :: 12.4.2 Comparison Functions and Operators

3. Adding Allow User Variables = True to the database connection;

   Adding ConnectionTimeout and default command timeout in connection.

  Reference: mysql - "Fatal error encountered during command execution"  - Stack Overflow

 

Hope it helps!

 

Best Regards,
Community Support Team _ kalyj

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

Hariharan_R
Solution Sage
Solution Sage

Hi

Please refer the below thread which discussed exact error.

https://community.powerbi.com/t5/Desktop/MySQL-Fatal-error-encountered-during-command-execution/m-p/...

Thanks

Hari

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


My Blog :: YouTube Channel :: My Linkedin


Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.