AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 850329
Accepted
Shahriar Shojib
Shahriar Shojib
Asked: 2017-05-16 22:57:42 +0800 CST2017-05-16 22:57:42 +0800 CST 2017-05-16 22:57:42 +0800 CST

MySQL 无法启动 [InnoDB 修复]

  • 772

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

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,但我不明白为什么它要分配那么多内存来恢复数据库!

mysql
  • 1 1 个回答
  • 12898 Views

1 个回答

  • Voted
  1. Best Answer
    Alex Johnston
    2017-05-18T00:57:04+08:002017-05-18T00:57:04+08:00

    我以前遇到过这个问题,并按照本指南解决了这个问题:

    恢复它的步骤。

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

    innodb_force_recovery = 4

    1. 重启mysqld。
    2. 转储所有表:# mysqldump -A > dump.sql
    3. 删除所有需要恢复的数据库。
    4. 停止 mysqld。
    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 表的简单查询,以防您想专门针对损坏。

    SELECT table_schema, table_nameFROM INFORMATION_SCHEMA.TABLESWHERE engine = 'innodb';
    
    • 5

相关问题

  • 开源与专有关系 db mgt 系统的优缺点是什么?

  • 在 solaris 10 上为 mysql 设置 max_allowed_pa​​cket

  • 如何移动 MySQL 的数据目录?

  • 通过 VPN 连接什么是远程服务器 IP?

  • mysql崩溃

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve