MySQL破log_记一次mysql事故恢复过程

本文记录了一次MySQL因机房搬迁导致的启动失败事故,详细分析了错误日志,包括:错误信息、数据库可能的损坏状态。在没有备份的情况下,通过设置innodb_force_recovery参数尝试恢复,最终通过导出数据、重新初始化数据库和导入备份完成了恢复。总结了事故教训,强调定期备份和正确处理虚拟机挂起的重要性。
摘要由CSDN通过智能技术生成

1、事故缘由

2020年04月需要搬迁机房,将虚拟机直接挂起,在当天搬迁完后,继续运行虚拟机,发现服务没起来,mysql启动失败。

2、出错日志

mysql启动报错如下:/var/log/mysqld.log

2020-04-20T02:27:01.161441Z 0 [Warning] Could not increase number of max_open_files to more than 5000 (request: 65535)

2020-04-20T02:27:01.162336Z 0 [Warning] Changed limits: table_open_cache: 1995 (requested 2000)

2020-04-20T02:27:01.386153Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).

2020-04-20T02:27:01.388194Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25) starting as process 74103 ...

2020-04-20T02:27:01.395664Z 0 [Note] InnoDB: PUNCH HOLE support available

2020-04-20T02:27:01.395810Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins

2020-04-20T02:27:01.395828Z 0 [Note] InnoDB: Uses event mutexes

2020-04-20T02:27:01.395840Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier

2020-04-20T02:27:01.395850Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.11

2020-04-20T02:27:01.395947Z 0 [Note] InnoDB: Using Linux native AIO

2020-04-20T02:27:01.397732Z 0 [Note] InnoDB: Number of pools: 1

2020-04-20T02:27:01.398049Z 0 [Note] InnoDB: Using CPU crc32 instructions

2020-04-20T02:27:01.401955Z 0 [Note] InnoDB: Initializing buffer pool, total size = 12G, instances = 8, chunk size = 128M

2020-04-20T02:27:02.521202Z 0 [Note] InnoDB: Completed initialization of buffer pool

2020-04-20T02:27:02.589960Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().

2020-04-20T02

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值