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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hminemail
Frequent Visitor

PowerBI - MySQL - ODBC Error 42000 syntax

Im trying to connect PowerBI to our MySQL Database. I've installed ODBC and created the connection.

Till now it all worked fine. But when i try to select a Table and load it, i keep getting thir error.

BI_KPIS_CLIENTES_DIARIO (2)
Failed to save modifications to the server. Error returned: 'Erro do OLE DB ou do ODBC : [DataSource.Error] ODBC: ERROR [42000] [MySQL][ODBC 8.0(w) Driver][mysqld-5.7.30]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`BI_KPIS_CLIENTES_DIARIO`' at line 75. '


I tried creating the ODBC connection Unicode and also ANSI, same error.
And i get this error for all the thousands os tables we have into our database.

I'm a begginner so it may be possible that i'm doing something very basic wrong. But i seached for a long time, and found no solution here.

Thanks for your time anyways.

 
 
1 ACCEPTED SOLUTION
themistoklis
Community Champion
Community Champion

@hminemail 

You are sending a code to MySQL database through ODBC connection and it seems that the connection cannot translate part of the code (it may even be one single character).

 

You need to find the bit of the code that can not be translated from the ODBC connection. 

If there is a manual then it is best you read it

 

Also why dont you use the native MySQL connection on PowerBI?

View solution in original post

3 REPLIES 3
themistoklis
Community Champion
Community Champion

@hminemail 

You are sending a code to MySQL database through ODBC connection and it seems that the connection cannot translate part of the code (it may even be one single character).

 

You need to find the bit of the code that can not be translated from the ODBC connection. 

If there is a manual then it is best you read it

 

Also why dont you use the native MySQL connection on PowerBI?

There's no code being sent. Anyways.

How can i use the native connection for MySQL?

When i try to select MySql connection it says i need one or more components installed, i searched and everything sent me to ODBC.

How can i create the native connection?

thx for the answer

IT WORKED!! THX really!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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