首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MySQL启动失败[InnoDB修复]

MySQL启动失败[InnoDB修复]
EN

Server Fault用户
提问于 2017-05-16 06:57:42
回答 1查看 15.5K关注 0票数 1

在检查了日志文件之后,我发现一些数据库有错误。

代码语言:javascript
复制
2017-05-16 08:52:48 7fc0cb8abb00  InnoDB: Assertion failure in thread 140466025315072 in file ha_innodb.cc line 21990
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. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
170516  8:52:48 [ERROR] mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see https://mariadb.com/kb/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.1.23-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=8
max_threads=10002
thread_count=8
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 22100835 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x7fb8d3fd1008
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7fc0cb8ab0b0 thread_stack 0x48400
2017-05-16  8:52:48 140466025618176 [ERROR] InnoDB:  InnoDB: Unable to allocate memory of size 18446744073709545072.

2017-05-16 08:52:48 7fc0cb8f5b00  InnoDB: Assertion failure in thread 140466025618176 in file ha_innodb.cc line 21990
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. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.

InnoDB恢复设置为3,但我不明白它为什么要分配那么多内存来恢复数据库!

EN

回答 1

Server Fault用户

回答已采纳

发布于 2017-05-17 08:57:04

我以前也有过这个问题,并跟随本指南解决了这个问题:

把它拿回来的步骤。

  1. 停下我的车。
  2. 备份/var/lib/mysql/ib*
  3. 将以下行添加到/etc/my.cnf中

innodb_force_recovery =4

  1. 重启mysqld。
  2. 转储所有tables:# mysqldump -A > dump.sql
  3. 删除所有需要恢复的数据库。
  4. 停下我的车。
  5. 删除/var/lib/mysql/ib*
  6. 注释掉/etc/my.cnf中的innodb_force_recovery
  7. 重启mysqld。查看mysql错误日志。默认情况下,它应该是/var/lib/mysql/server/hostname.com.err,以查看它如何创建新的ib*文件。
  8. 从转储还原数据库:mysql< dump.sql

**提示:一个简单的查询,用于查找所有的InnoDB表,以防您想要专门针对这些损坏。

代码语言:javascript
复制
SELECT table_schema, table_nameFROM INFORMATION_SCHEMA.TABLESWHERE engine = 'innodb';
票数 5
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/850329

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档