Plesk

Plesk upgrade or databases backup fails: mysqldump: unknown variable

Symptoms

Cause

The incorrect directive is set under [mysqldump] section in the MySQL/MariaDB configuration file.

Resolution

  1. Log into the server via SSH.

  2. Execute the command below to find the MySQL/MariaDB configuration file:

    # (ls -l /etc/my.cnf || ls -l /etc/mysql/my.cnf) 2>> /dev/null | awk {'print $NF'}

    Note: in the example below the name of the found file will be /etc/my.cnf, in your case it also  can be /etc/mysql/my.cnf.

  3. Create a backup for found file on the previous step:

    # cp -pr /etc/my.cnf{,.backup}

  4. Using the vi text editor open the /etc/my.cnf found on the step №2.
  5. Find and remove the line with directive reported during the Plesk upgrade process from the [mysqldump] section.
  6. Save the changes
  7. Run the command below to restart MySQL/MariaDB service:

    # (systemctl restart mysql || systemctl restart mariadb || systemctl restart mysqld) 2>/dev/null