4K字记一次血淋淋的MySQL崩溃修复案例

本文详述了一次MySQL崩溃后修复的全过程,涉及InnoDB文件损坏,通过设置innodb_force_recovery参数,尝试多种恢复方法,包括创建新表、mysqldump导出导入以及调整配置文件等。同时,文中强调了数据备份的重要性。
摘要由CSDN通过智能技术生成

问题描述

研究MySQL源代码,调试并压测MySQL源代码时,MySQL崩溃了!问题是它竟然崩溃了!而且还损坏了InnoDB文件!!还好是在调试环境下发生的,赶紧看看如何解决这个问题,经过一系列的查阅资料、验证、对比、MySQL源码调试跟踪、修复损坏的InnoDB文件、总结等流程,整理成此文,如果以后真的发生在线上的生产坏境,也不用担心是不是要跑路的问题了,可以分分钟搞定MySQL的崩溃问题了!!查看错误日志,如下:

-----------------------------------------
161108 23:36:45 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
2022-08-25 23:36:46 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2022-08-25 23:36:46 5497 [Note] Plugin 'FEDERATED' is disabled.
2022-08-25 23:36:46 7f11c48e1720 InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
2022-08-25 23:36:46 5497 [Note] InnoDB: Using atomics to ref count buffer pool pages
2022-08-25 23:36:46 5497 [Note] InnoDB: The InnoDB memory heap is disabled
2022-08-25 23:36:46 5497 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2022-08-25 23:36:46 5497 [Note] InnoDB: Memory barrier is not used
2022-08-25 23:36:46 5497 [Note] InnoDB: Compressed tables use zlib 1.2.3
2022-08-25 23:36:46 5497 [Note] InnoDB: Using CPU crc32 instructions
2022-08-25 23:36:46 5497 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2022-08-25 23:36:46 5497 [Note] InnoDB: Completed initialization of buffer pool
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 5.
InnoDB: You may have to recover from a backup.
2022-08-25 23:36:46 7f11c48e1720 InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; hex 7478d0780000
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值