Plesk

Cannot import database dump in Plesk: Index column size too large. The maximum column size is 767 bytes

Symptoms

Cannot import database dump in Plesk > Domains > example.com > Databases > the Import button (under the database):

Failed to create tmp table table_name. Index column size too large. The maximum column size is 767 bytes.

Cause

Incorrect MySQL configuration - insufficient InnoDB values.

Resolution

CentOS/RHEL-based

  1. Connect to the server via SSH

  2. Edit the file /etc/my.cnf as follows:

    innodb_default_row_format = dynamic
    innodb_large_prefix = 1

  3. Restart MySQL server to apply changes:

    # systemctl restart mysqld

Ubuntu/Debian

  1. Connect to the server via SSH

  2. Edit the file /etc/mysql/my.cnf as follows:

    innodb_default_row_format = dynamic
    innodb_large_prefix = 1

  3. Restart MySQL server to apply changes:

    # systemctl restart mysql