KNOWLEDGE BASE

MySQL Error "Commands out of sync"


Published: 27 Mar 2020
Last Modified Date: 27 Mar 2020

Issue

When connecting to MySQL using initial SQL and custom SQL, the following error may occur:

Commands out of sync; you can't run this command now

Environment

  • Tableau Desktop
  • MySQL
  • Initial SQL
  • Custom SQL

Resolution

To troubleshoot this error, check that all variables mentioned in the custom SQL query have been assigned values in the initial SQL command.

Cause

According to MySQL documentation, this error occurs when client functions are called in the wrong order.
Did this article resolve the issue?