Plesk

MySQL database import in Plesk fails: ERROR 1118 (42000): Row size too large

Symptoms

Cause

MySQL InnoDB requires database records to fit in the B-tree leaf page. See MySQL bug tracker, Bug #69336 for more details.

Resolution

For Linux on CentOS, RHEL, CloudLinux

  1. Connect to the server via SSH

  2. Back up the MySQL configuration file /etc/my.cnf:

    # cp /etc/my.cnf{,.bak}

  3. Add the following lines to the file in step 2. under [mysqld] section:

    default_storage_engine=MyISAM
    innodb_strict_mode = 0

  4. Restart MySQL service:

    # service mysql restart

  5. Import the MySQL database

  6. Restore backed up MySQL configuration file

    # mv /etc/my.cnf.bak /etc/my.cnf --force

  7. Restart MySQL service :

    # service mysql restart

For Linux on Debian or Ubuntu

  1. Connect to the server via SSH

  2. Create a backup of the MySQL configuration file /etc/mysql/my.cnf:

    # cp /etc/mysql/my.cnf{,.bak}

  3. Add the following lines to the file in step 2. under [mysqld] section:

    default_storage_engine=MyISAM
    innodb_strict_mode = 0

  4. Restart MySQL service:

    # service mysql restart

  5. Import the MySQL database

  6. Restore backed up MySQL configuration file

    # mv /etc/mysql/my.cnf.bak /etc/mysql/my.cnf --force

  7. Restart MySQL service :

    # service mysql restart

For Windows

  1. Connect to the server via RDP

  2. Copy the file %plesk_dir%DatabasesMySQLmy.ini to %plesk_dir%DatabasesMySQLmy.ini_bak

  3. Add the following lines to the file in step 2. under [mysqld] section:

    innodb_strict_mode = 0

  4. Restart MySQL service using Plesk Services Monitor

  5. Import the MySQL database

  6. Restore file %plesk_dir%DatabasesMySQLmy.ini_bak to %plesk_dir%DatabasesMySQLmy.ini

  7. Restart MySQL service using Plesk Services Monitor