Unable to restore/insert into MySQL database, the following error occurs:
ERROR 1030 (HY000): Got error -1 from storage engine
/var/log/mysql.log contains following records:
ERROR 1030 (HY000): Got error -1 from storage engine InnoDB: A new raw disk partition was initialized or InnoDB: innodb_force_recovery is on: we do not allow InnoDB: database modifications by the user. Shut down InnoDB: mysqld and edit my.cnf so that newraw is replaced InnoDB: with raw, and innodb_force_... is removed.
Server has enough free disk space and RAM memory.
MySQL is running with
/etc/my.cnfand make sure
innodb_force_recoveryis not set:
# grep 'force_recovery' /etc/my.cnf innodb_force_recovery = 5
If it is enabled, switch
innodb_force_recoveryoff by changing the value to '0':
# grep 'force_recovery' /etc/my.cnf innodb_force_recovery = 0
# /etc/init.d/mysqld restart
Please refer to the following mysql guide for more details:
"Only set innodb_force_recovery to a value greater than 0 in an emergency situation, so that you can start InnoDB and dump your tables. Before doing so, ensure that you have a backup copy of your database in case you need to recreate it. Values of 4 or greater can permanently corrupt data files....innodb_force_recovery is 0 by default (normal startup without forced recovery)."
Plesk do not make changes into
/etc/my.cnf by setting
innodb_force_recovery to enabled state.