国庆回来后,发现mysql停止服务了,没办法继续启动了。查看日志,看到:

131008 09:56:03 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131008  9:56:03 [Warning] option 'read_buffer_size': unsigned value 1024 adjusted to 8192
131008  9:56:03 [Note] Plugin 'FEDERATED' is disabled.
131008  9:56:03 InnoDB: The InnoDB memory heap is disabled
131008  9:56:03 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131008  9:56:03 InnoDB: Compressed tables use zlib 1.2.3
131008  9:56:03 InnoDB: Using Linux native AIO
131008  9:56:03 InnoDB: Initializing buffer pool, size = 128.0M
131008  9:56:03  InnoDB: Assertion failure in thread 47953380146304 in file ut0mem.c line 103
InnoDB: Failing assertion: ret || !assert_on_error
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.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
01:56:03 UTC - 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.
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.
 
key_buffer_size=0
read_buffer_size=8192
max_used_connections=0
max_threads=151
thread_count=0
connection_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 312196 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0
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 = 0 thread_stack 0x40000
/usr/libexec/mysqld(my_print_stacktrace+0x2e)[0x78b18e]
/usr/libexec/mysqld(handle_fatal_signal+0x493)[0x6741b3]
/lib64/libpthread.so.0(+0xf500)[0x2b9d0116a500]
/lib64/libc.so.6(gsignal+0x35)[0x2b9d02b9f8a5]
/lib64/libc.so.6(abort+0x175)[0x2b9d02ba1085]
/usr/libexec/mysqld[0x8363d8]
/usr/libexec/mysqld[0x8944be]
/usr/libexec/mysqld[0x893d26]
/usr/libexec/mysqld[0x84ea80]
/usr/libexec/mysqld[0x858aab]
/usr/libexec/mysqld[0x817bf0]
/usr/libexec/mysqld[0x7e4390]
/usr/libexec/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x41)[0x676eb1]
/usr/libexec/mysqld[0x58d4d8]
/usr/libexec/mysqld(_Z11plugin_initPiPPci+0x8c8)[0x590db8]
/usr/libexec/mysqld[0x518078]
/usr/libexec/mysqld(_Z11mysqld_mainiPPc+0x3fd)[0x51b1dd]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x2b9d02b8bcdd]
/usr/libexec/mysqld[0x510ee5]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
131008 09:56:03 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

根据这个链接:

http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html,进行操作,修改my.cnf,加入:

[mysqld]
innodb_force_recovery = 4
innodb_force_recovery有0 - 6,7个选项,具体含义可以直接访问上面的链接,官方解释得很清楚。

保存my.cnf后,尝试重启mysql,又出现新情况:

131008 10:00:24 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131008 10:00:24 [Note] Plugin 'FEDERATED' is disabled.
131008 10:00:24 InnoDB: The InnoDB memory heap is disabled
131008 10:00:24 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131008 10:00:24 InnoDB: Compressed tables use zlib 1.2.3
131008 10:00:24 InnoDB: Using Linux native AIO
131008 10:00:24 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
131008 10:00:24 InnoDB: Completed initialization of buffer pool
131008 10:00:24 InnoDB: Fatal error: cannot allocate memory for the buffer pool
131008 10:00:24 [ERROR] Plugin 'InnoDB' init function returned error.
131008 10:00:24 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
131008 10:00:24 [ERROR] Unknown/unsupported storage engine: InnoDB
131008 10:00:24 [ERROR] Aborting
 
131008 10:00:24 [Note] /usr/libexec/mysqld: Shutdown complete
 
131008 10:00:24 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
竟然提示内存不足以分配,暂时释放了一下内存,重新重启,终于正常了。接下来要查哪里内存使用出现问题了。

[转]解决Mysql InnoDB: Failing assertion: ret || !assert_on_error问题的更多相关文章

  1. mysql InnoDB: Assertion failure in thread xxxx in file ut0mem.cc line 105

    mysql InnoDB: Assertion failure in thread xxxx in file ut0mem.cc line 105 错误信息 InnoDB: Assertion fai ...

  2. 巧用MySQL InnoDB引擎锁机制解决死锁问题(转)

    该文会通过一个实际例子中的死锁问题的解决过程,进一步解释innodb的行锁机制 最近,在项目开发过程中,碰到了数据库死锁问题,在解决问题的过程中,笔者对MySQL InnoDB引擎锁机制的理解逐步加深 ...

  3. 使用mysql innodb 使用5.7的json类型遇到的坑和解决办法

    ---------------------------------------------- #查询JSON的某个字段 select data -> '$.Host' from temp #创建 ...

  4. Mysql InnoDB 共享表空间和独立表空间

    前言:学习mysql的时候总是习惯性的和oracle数据库进行比较.在学习mysql InnoDB的存储结构的时候也免不了跟oracle进行比较.Oracle的数据存储有表空间.段.区.块.数据文件: ...

  5. 彻底解决mysql中文乱码的办法 ???

      MySQL会出现中文乱码的原因不外乎下列几点:1.server本身设定问题,例如还停留在latin12.table的语系设定问题(包含character与collation)3.客户端程式(例如p ...

  6. 彻底解决mysql中文乱码的办法,修改mysql解压缩版(免安装版或zip版)字符编码

    MySQL会出现中文乱码的原因不外乎下列几点:1.server本身设定问题,例如server字符编码还停留在latin12.table的语系设定问题(包含character与collation)3.客 ...

  7. MySQL InnoDB存储引擎中的锁机制

    1.隔离级别 Read Uncommited(RU):这种隔离级别下,事务间完全不隔离,会产生脏读,可以读取未提交的记录,实际情况下不会使用. Read Committed (RC):仅能读取到已提交 ...

  8. 从一个死锁看mysql innodb的锁机制

    背景及现象 线上生产环境在某些时候经常性的出现数据库操作死锁,导致业务人员无法进行操作.经过DBA的分析,是某一张表的insert操 作和delete操作发生了死锁.简单介绍下数据库的情况(因为涉及到 ...

  9. MySQL InnoDB四个事务级别 与 脏读、不反复读、幻读

    MySQL InnoDB事务隔离级别脏读.可反复读.幻读 希望通过本文.能够加深读者对ySQL InnoDB的四个事务隔离级别.以及脏读.不反复读.幻读的理解. MySQL InnoDB事务的隔离级别 ...

随机推荐

  1. MAMP pro mac 本地集成环境 php sal apache等集成软件

    http://www.sdifen.com/mamppro411.html 已存在我的百度云盘 安装后,打开  MAMP 第一步:配置启动和停止选项 默认启动项.默认停止项,只需要勾选: 1.Star ...

  2. Java 中的包装类

    Java 中的包装类 相信各位小伙伴们对基本数据类型都非常熟悉,例如 int.float.double.boolean.char 等.基本数据类型是不具备对象的特性的,比如基本类型不能调用方法.功能简 ...

  3. OPENVPN2.3配置文档官方说明

    openvpn Section: Maintenance Commands (8)Index NAME openvpn - secure IP tunnel daemon. SYNOPSIS open ...

  4. 第八章 Mixer 适配器的应用

    概述: Mixer “知晓”每一次服务间的调用过程,这些调用过程会为Mixer提供丰富的相关信息,Mixer通过接入的适配器对这些信息进行处理,能够在调用的预检(执行前)和报告(执行后)阶段执行多种任 ...

  5. HDU-3944 DP?(组合数求模)

    一.题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=3944 二.题意 给一个巨大的杨辉三角,采用类似DP入门题“数字三角形”的方式求从顶点$(0, 0) ...

  6. C++ 并发编程 01 线程api

    1.使用多线程的好处: 提高性能,分离关注点  2. 多线程所在头文件 <thread> 3. 使用线程方式为std::thread(functioncall),如: #include & ...

  7. poj-3253-Fence Repair(哈夫曼)

    /* Fence Repair Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 19914 Accepted: 6314 Desc ...

  8. java程序调优系列(一)intern()代替equal()

    1. 首先String不属于8种基本数据类型,String是一个对象. 因为对象的默认值是null,所以String的默认值也是null:但它又是一种特殊的对象,有其它对象没有的一些特性. 2. ne ...

  9. Hive 的查询结果直接导入到 MySQL 中的方法

    步骤一: hive> add jar /setup/hive/lib/mysql-connector-java-5.1.25-bin.jar; hive> add jar /usr/lib ...

  10. C++ - 常用的标准库函数

      写在前面 C++是一门博大精深的语言,也是最难学的一门编程语言,每一位励志学好C++的程序员都需要从基本功开始,稳扎稳打. 自从1998年C++ standard定案以后,C++程序库便有了大幅扩 ...