mysql 测试环境异常宕机

系统:\nKylin 3.3

mysql版本:5.6.15--yum安装,麒麟提供的yum源数据库版本

error日志

181218 09:38:52 mysqld_safe Starting mysqld daemon with databases from /home/data/mysqldata/3306/data
2018-12-18 09:42:56 12390 [Note] Plugin 'FEDERATED' is disabled.
2018-12-18 09:42:56 12390 [Note] InnoDB: The InnoDB memory heap is disabled
2018-12-18 09:42:56 12390 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-12-18 09:42:56 12390 [Note] InnoDB: Compressed tables use zlib 1.2.3
2018-12-18 09:42:56 12390 [Note] InnoDB: Using CPU crc32 instructions
2018-12-18 09:42:56 12390 [Note] InnoDB: Initializing buffer pool, size = 6.0G
2018-12-18 09:42:57 12390 [Note] InnoDB: Completed initialization of buffer pool
2018-12-18 09:42:57 12390 [Note] InnoDB: Highest supported file format is Barracuda.
2018-12-18 09:42:57 12390 [Note] InnoDB: Log scan progressed past the checkpoint lsn 9090973899
2018-12-18 09:42:57 12390 [Note] InnoDB: Database was not shutdown normally!
2018-12-18 09:42:57 12390 [Note] InnoDB: Starting crash recovery.
2018-12-18 09:42:57 12390 [Note] InnoDB: Reading tablespace information from the .ibd files...
2018-12-18 09:42:59 12390 [Note] InnoDB: Restoring possible half-written data pages
2018-12-18 09:42:59 12390 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 9096216576
InnoDB: Doing recovery: scanned up to log sequence number 9101459456
InnoDB: Doing recovery: scanned up to log sequence number 9106702336
InnoDB: Doing recovery: scanned up to log sequence number 9111945216
InnoDB: Doing recovery: scanned up to log sequence number 9112050393
2018-12-18 09:43:17 12390 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: Last MySQL binlog file position 0 466214313, file name mysql-bin.000012
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 8.
InnoDB: You may have to recover from a backup.
2018-12-18 09:43:19 7fa75b768740 InnoDB: Page dump in ascii and hex (16384 bytes):
len 16384; hex 000000000000000000000000000000000

。。。。。一堆

InnoDB: End of page dump
2018-12-18 09:43:20 7fa75b768740 InnoDB: uncompressed page, stored checksum in field1 0, calculated checksums for field1: crc32 3919750611, innodb 563001162, none 3735928559, stored checksum in field2 3449489408, calculated checksums for field2: crc32 3919750611, innodb 1371122432, none 3735928559, page LSN 0 0, low 4 bytes of LSN at page end 0, page number (if stored to page already) 0, space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be a freshly allocated page
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 8.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
2018-12-18 09:43:20 7fa75b768740 InnoDB: Assertion failure in thread 140356770760512 in file buf0buf.cc line 4054
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.
01:43:20 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=33554432
read_buffer_size=33554432
max_used_connections=0
max_threads=3000
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 = 294985830 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/sbin/mysqld(my_print_stacktrace+0x3b)[0x8d6d1b]
/usr/sbin/mysqld(handle_fatal_signal+0x4a1)[0x66e031]
/lib64/libpthread.so.0(+0xf370)[0x7fa75b357370]
/lib64/libc.so.6(gsignal+0x37)[0x7fa75a15e1d7]
/lib64/libc.so.6(abort+0x148)[0x7fa75a15f8c8]
/usr/sbin/mysqld[0xa52c98]
/usr/sbin/mysqld[0xa665b8]
/usr/sbin/mysqld[0xa4d7c2]
/usr/sbin/mysqld[0xa34044]
/usr/sbin/mysqld[0xa85a58]
/usr/sbin/mysqld[0x9f323d]
/usr/sbin/mysqld[0x934218]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x48)[0x5b1b88]
/usr/sbin/mysqld[0x6f37e0]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0x910)[0x6f9be0]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x8cd)[0x5ab7ad]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7fa75a14ab35]
/usr/sbin/mysqld[0x59f21d]
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.
181218 09:43:20 mysqld_safe mysqld from pid file /home/data/mysqldata/3306/data/mysqlhq.pid ended

办法:

尝试修改参数innodb_force_recovery=1 ,仍然不能启动,数据库,报一样的错误

尝试修改为2~6,仍然不能启动数据

测试环境没有备份, 只能从binlog中恢复

mysqlbinlog -vv mysql-bin.000001 >/tmp/01binlog.sql

mv /home/data/mysqldata/3306/data /home/data/mysqldata/3306/data1

rm -rf /home/data/mysqldata/3306/data

/usr/bin/mysql_install_db --defaults-file=/home/data/mysqldata/3306/my.cnf --datadir=/home/data/mysqldata/3306/data --user=mysql
/usr/bin/mysqld_safe --defaults-file=/home/data/mysqldata/3306/my.cnf &
/usr/bin/mysql -S /data/mysqldata/3306/mysql.sock
(root@localhost:mysql.sock) [(none)]> source /tmp/1blog.txt

(root@not_connected:not_connected) [tmp]> source /tmp/1blog.txt
[mysql@mysqlhq 3306]$ /usr/bin/mysql -uroot -p -S /home/data/mysqldata/3306/mysql.sock
Enter password:
(root@localhost:mysql.sock) [(none)]> source /tmp/4blog.txt

参考其他的方法,修改参数innodb_force_recovery,别人的情况适用,但在这里不适用,也有说是5.6的bug,但是提供的bug号,没有找到

参考

http://blog.itpub.net/133735/viewspace-755805/

https://blog.csdn.net/u010719917/article/details/78271034

mysql 异常宕机 ..InnoDB: Database page corruption on disk or a failed,,InnoDB: file read of page 8.的更多相关文章

  1. mysql数据库崩溃:InnoDB: Database page corruption on disk or a failed

    修改mysql配置文件my.cnf,添加 innodb_force_recovery = 6 innodb_purge_thread = 0 重启mysql 这时只可以执行select,create, ...

  2. MySQL主从宕机的解决方法

    测试系统:centos6.5系统 测试环境IP地址划分: master: 192.168.80.130 slave:192.168.80.143 slave:192.168.80.146 首先模拟(M ...

  3. MySQL Bug导致异常宕机的分析流程

    原文链接:http://click.aliyun.com/m/42521/ 摘要: 本文主要通过一个bug来记录一下如何分析一个MySQL bug的崩溃信息. 版本:Percona 5.7.17-11 ...

  4. 记一次线上Mysql数据库 宕机

    从发现问题,到最后解决一共消耗两个半小时(7:30~10:00),报警电话16通,警察坐镇,未完待续 ......

  5. MySQL定时检查是否宕机并邮件通知

    我们有时候需要一些检查MySQL是否宕机,如果宕机了应自动重新启动应用并通知运维人员!此脚本用来简单的实现MySQL宕机后自动重启并邮件通知运维,此为SHELL脚本,当然也有一些朋友喜欢用Python ...

  6. (转)从史上八大MySQL宕机事故中学到的经验

    一.Percona网站宕机事件 震级:3 发生时长:2011年7月11日 持续时长:数日 地点:加州Pleasanton(幸福屯) 宕机原因:Percona网站主服务器上的3块硬盘损坏,同时因为人员变 ...

  7. Centos7.5调试/etc/sysctl.conf文件导致宕机

    今天安装greenplus数据库,需要调试一个核心文件/etc/sysctl.conf文件,结果导致系统异常宕机,出现的问题就是使用任何命令都不能输出正确的结果,只有这个显示: 不知道是什么原因,ls ...

  8. 服务应用突然宕机了?别怕,Dubbo 帮你自动搞定服务隔离!

    某日中午,午睡正香的时候,接到系统的报警电话,提示生产某物理机异常宕机了,目前该物理机已恢复,需要重启上面部署的应用. 这时瞬间没有了睡意,登上堡垒机,快速重启了应用,系统恢复正常.本想着继续午睡,但 ...

  9. 服务器宕机,mysql无法启动,job for mysql.service failed because the process exited with error code,数据库备份与恢复

    [问题现象] 服务器在运行过程中,因人为意外导致电源被拔,服务器宕机,mysql重启不成功,报错如下 根据提示,输入systemctl status mysql.service和journalctl ...

随机推荐

  1. 【P3957】跳房子(单调队列+DP+二分)

    终于把这个题缸出来了,话说这题也不是想的那么难... 因为最小的最大,所以二分,因为由前面推出后面,所以DP,因为输入单调,朴素DP会T,所以单调队列.要注意的是,这个题数据很大,要开LL,然后DP数 ...

  2. js用星号隐藏电话中间四位号码

    $(document).ready(function(){ var mobile="{$user.mobile}"; var reg=/^(\d{3})\d{4}(\d{4})$/ ...

  3. java实现二进制的加法

    先看打印结果在看代码比较好理解.结果在最下面的位置. 总结:讲解了二进制的按位异域.按位与.左移的运算规则.并通过次3种算法得到2个数相加的结果.二进制应该还有其他算法,由于知识浅薄就不知道了. 代码 ...

  4. XE8_DataSnap设置

    1.参考文章 http://blog.csdn.net/l799623787/article/details/17002979 ZC: 系列在这里:http://www.cnblogs.com/Chi ...

  5. tomcat配置 启动

     <Context docBase="E:\apache-tomcat-7.0.50\wtpwebapps\mycms" path="" reloadab ...

  6. phalcon: 开启模板缓存和缓存路径

    /** * 设置view */ $di->set('view', function () use ($config) { $view = new \Phalcon\Mvc\View(); $vi ...

  7. Enum Binding ItemsSource In WPF

    Enum Binding ItemsSource In WPF   在WPF中枚举绑定到ItemsSource. 一.通过ObjectDataProvider 获取Enum数据源 首先我们定义一个En ...

  8. Python — 多线程与多进程

    1.多线程 线程是操作系统能够进行运算调度的最小单位.它被包含在进程之中,是进程中的实际运作单位,一个进程可以包含多个线程.一条线程指的是进程中一个单一顺序的控制流,一个进程中可以并发多个线程,每条线 ...

  9. poj3189二分图多重匹配

    题意:有一些牛和牛棚(有容量),每头牛对牛棚有喜好程度,要求每头牛都有一个棚子的情况下,找最小的喜好程度之差 题解:题意是真的恶心,wa了好久才发现没读懂,一直以为输入 的是排名,其实是牛棚标号,从1 ...

  10. js动态拼接参数到请求的url上

    var queryConfig={ "page" : "index", "method" : 2, //1:按照方法A查看 2:按照方法B查 ...