针对MySQL数据库无法打开的场景的恢复
此场景下用户尝试启动MySQL实例,但MySQL实例可能因数据库本身损坏而CRASH进程崩溃。
相关报错可能如下:
InnoDB: Waiting for the background threads to start InnoDB: Error: tablespace size stored in header is 3712 pages, but InnoDB: the sum of data file sizes is only 3072 pages InnoDB: Cannot start InnoDB. The tail of the system tablespace is InnoDB: missing. Have you edited innodb_data_file_path in my.cnf in an InnoDB: inappropriate way, removing ibdata files from there? InnoDB: You can set innodb_force_recovery=1 in my.cnf to force InnoDB: a startup if you are trying to recover a badly corrupt database. InnoDB: Assertion failure in thread 3876 in file ha_innodb.cc line 17352 InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB ta