KNOWLEDGE BASE

"Malformed packet" error appears when connect Tableau Desktop 2021.x to MySQL database 5.7


Published: 05 Aug 2021
Last Modified Date: 05 Aug 2021

Issue

"Malformed packet" error appears when connect Tableau Desktop 2021.x to MySQL database 5.7

 

Environment

  • Tableau Desktop 2021.x
  • MySQL 5.7

Resolution

  • Uninstall the current MySQL ODBC driver 8.00.26.
  • Install MySQL ODBC driver 5.3.

Additional Information

1) Problem cause:
Although according to https://www.tableau.com/support/drivers, Tableau recommend to install the latest MySQL 8.0 driver,  for this scenario, the backend database server is MySQL version 5.7, which is not fully compatible with the latest MySQL 8.0 driver.

2) Snippet of tabprotosrv.txt

2021-08-03T15:26:46.754: 24616-4ae8 MSG
    ODBCProtocolImpl::PrepareQuery: Error: Failed to prepare the query for execution.

2021-08-03T15:26:46.754: 24616-4ae8 DATABASE-ERROR
    line : 1872
    file : D:\tc\work\t212\g_pc\modules\connectors\tabmixins\main\db\ODBCProtocolImpl.cpp
    retcode-desc : SQL_ERROR
    error-records : [{'sql-state-desc': 'SQLSTATE_GENERAL_ERROR_ODBC3x', 'native-error': 2027, 'error-desc': '[MySQL][ODBC 8.0(w) Driver][mysqld-5.5.30]Malformed packet', 'sql-state': 'HY000', 'error-record': 1}]
    retcode : -1
    protocol : 16eb47b54b0
Did this article resolve the issue?