针对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 tablespace

当MySQL实例因数据库损坏无法启动时,可以使用DBRECOVER FOR MYSQL进行恢复。本文介绍了如何关闭MySQL实例,启动恢复程序,并在图形化界面中选择数据文件夹,浏览并导出数据,最后通过SQL文件恢复数据。
最低0.47元/天 解锁文章
678

被折叠的 条评论
为什么被折叠?



