Error "mysqldump: Couldn't execute 'SHOW PACKAGE STATUS..."

Error "mysqldump: Couldn't execute 'SHOW PACKAGE STATUS WHERE Db = '[...]'': You have an error in your SQL syntax [...] (1064)" when backing up MySQL

This error can occur if you are using a version of mysqldump from MariaDB 10.3 prior to July 2019, connecting to an older MySQL database.

This version of mysqldump does not correctly limit itself to the remote server's capabilities.

For instance, this issue can occur with the defalt mysqldump in Debian Buster 10.0.

You can read more about this issue on the MariaDB bug tracker:

Workaround 

You can work around this issue by disabling backup of stored procedures.

If this is acceptable, you can perform this workaround by stripping the --routines parameter that Magnus Box passes to mysqldump. To do so on Linux,

  1. Create a file with the following content:
    #!/bin/bash # This program is a wrapper for mysqldump that removes the --routines argument, # to work around issue MDEV-17429 with older MySQL servers args=("$@") for ((i=0; i<"${#args[@]}"; ++i)); do case ${args[i]} in     --routines)         unset args[i];     break;; esac done /usr/bin/mysqldump "${args[@]}"
  2. Save this file as /opt/productname/mysqldump-no-routines
  3. Mark the file as executable: chmod +x /opt/productname/mysqldump-no-routines
  4. In the Protected Item settings, set "custom mysqldump path" to this file
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us