ERROR 1025 (HY000): Error on rename of .. (errno: -1)

database, innodb, mysql, mysql-5.0

Solution

According to `this` the problem may be related to `innodb_force_recovery` setting.

Run this to check if it's set to zero or not:

 SHOW VARIABLES LIKE 'innodb_force_recovery';

Problem

I am using Oracle MySQL 5.0.88 in CentOS 5.7 (64-bit). When i am trying to create an index to the tables means it shows mysql> CREATE INDEX `activity_type_id` ON `activity_log` (`activity_type_id`); ERROR 1025 (HY000): Error on rename of './sample_production/activity_log' to './sample_production/#sql2-665c-7' (errno: -1) it's some what difficult to search with the error number. Please help me out why this error happens.

Original source