I am running MySQL on a Windows 2008 server. One of the tables (> 1 million records) seems to be corrupted. The mysql error log shows this:
InnoDB: Error: trying to access page number 197105 in space 89,
InnoDB: space name dbname/tablename,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
Based on this error message, I checked my.cnf for the relevant lines:
innodb_data_home_dir = "C:/xampp/mysql/data"
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = "C:/xampp/mysql/data"
This is exactly where the data resides. ibdata1 is about 208 MB in size, the tablename.ibd is about 4 GB in size. I've been using this server succesfully for many months.
After searching on this site and elsewhere, I tried to perform recovery as follows:
- Set
innodb_force_recovery=1and then up to6. Next, dump the specific table with mysqldump. I am using this command:
mysqldump dbname tablename --user=root --password=blahblah.During this dump, for recovery levels 1 through 3, mysql crashes ('goes away'). At 4, it managed to dump the first 23992 records, but then it saidLost connection to MySQL server during query when dumping table
tablenameat row: 23992.The log has some additional lines preceding what I showed above:
InnoDB: Failed to find tablespace for table "dbname"."tablename" in the cache. Attempting to load the tablespace with space id 89. InnoDB: Error: trying to access page number 0 in space 89, InnoDB: space name dbname/tablename, InnoDB: which is outside the tablespace bounds.It seems as soon as I touch or (select) query this table, either through php, python or phpMyAdmin, mysql crashes.
Does anybody have any other suggestions, possibly based on the tablespace bounds error above?
Thanks in advance!