Articles in this section

Plesk upgrade or databases backup fails: mysqldump: unknown variable

Plesk for Linux kb: technical ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • Unable to upgrade Plesk, the process fails with the error below:

    CONFIG_TEXT: /usr/bin/mysqldump: unknown variable 'bind-address=203.0.113.2'
    ERROR while trying to backup MySQL database


    CONFIG_TEXT: /usr/bin/mysqldump: unknown variable 'sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'


    CONFIG_TEXT: /usr/bin/mysqldump: unknown variable 'max_connections=150'

  • Creation of the database backup fail with the same error.

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

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.