一次人为事故处理过程

在一台安装了mysql的服务器上装mongo,就在为mongo建立了设定了密root账号之后,准备重启mongo服务,一不留神敲成了service mysqld stop。。。而且还快速的敲了回车。。。灾难性的后果到来了

把mysql服务停掉之后,吓一跳,连忙执行service mysqld start居然是failed

查看mysql日志,报错如下:

180720 17:48:02  InnoDB: Page checksum 1575996416, prior-to-4.0.14-form checksum 1371122432
InnoDB: stored checksum 0, prior-to-4.0.14-form stored checksum 0
InnoDB: Page lsn 0 0, low 4 bytes of lsn at page end 0
InnoDB: Page number (if stored to page already) 0,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 0
InnoDB: Page may be a freshly allocated page
180720 17:48:02InnoDB: Error: trying to access a stray pointer 0x80007f381d5d3ff8
InnoDB: buf pool start is at 0x7f381d5c8000, end at 0x7f381ddc8000
InnoDB: Probable reason is database corruption or memory
InnoDB: corruption. If this happens in an InnoDB database recovery, see
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html
InnoDB: how to force recovery.
180720 17:48:02  InnoDB: Assertion failure in thread 139879072221152 in file ../../storage/innobase/include/buf0buf.ic line 264
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.1/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
09:48:02 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=8384512
read_buffer_size=131072
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 = 338336 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+0x29) [0x850ca9]
/usr/libexec/mysqld(handle_fatal_signal+0x483) [0x6a4143]
/lib64/libpthread.so.0(+0xf7e0) [0x7f382227b7e0]
/lib64/libc.so.6(gsignal+0x35) [0x7f38208af495]
/lib64/libc.so.6(abort+0x175) [0x7f38208b0c75]
/usr/libexec/mysqld(page_cur_search_with_match+0x77b) [0x79855b]
/usr/libexec/mysqld(btr_cur_search_to_nth_level+0x6ea) [0x73bd9a]
/usr/libexec/mysqld(btr_pcur_open_on_user_rec+0x64) [0x7eab34]

 

似乎没有什么有用的价值,并非如其他网友遇到的磁盘满了的状况。

心惊胆战的找了一个小时,最后看到一个

InnoDB: Error: trying to access a stray pointer 0x80007f381d5d3ff8
InnoDB: buf pool start is at 0x7f381d5c8000, end at 0x7f381ddc8000
InnoDB: Probable reason is database corruption or memory
InnoDB: corruption

mysql是异常退出,启动过程中需要恢复,而恢复是根据日志进行的,在这个过程中报错,那就应该是日志异常。

找到mysql数据和日志文件ibdata1、ib_logfile0、ib_logfile1,将其移走(mv),再次启动mysql

well done,顺利启动

数据应该会有丢失(在stop过程中数据未保存)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值