Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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.
Solved! Go to Solution.
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.
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.
Hi
Please refer the below thread which discussed exact error.
Thanks
Hari
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!