服务器断电mysql启动失败问题

启动mysql错误日志如下:

190507 18:43:29 mysqld_safe Starting mysqld daemon with databases from /data/MySQL_Data/
2019-05-07 18:43:29 7470 [Note] Plugin 'FEDERATED' is disabled.
2019-05-07 18:43:29 7470 [Note] InnoDB: Using atomics to ref count buffer pool pages
2019-05-07 18:43:29 7470 [Note] InnoDB: The InnoDB memory heap is disabled
2019-05-07 18:43:29 7470 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2019-05-07 18:43:29 7470 [Note] InnoDB: Memory barrier is not used
2019-05-07 18:43:29 7470 [Note] InnoDB: Compressed tables use zlib 1.2.3
2019-05-07 18:43:29 7470 [Note] InnoDB: Using CPU crc32 instructions
2019-05-07 18:43:29 7470 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2019-05-07 18:43:29 7470 [Note] InnoDB: Completed initialization of buffer pool
2019-05-07 18:43:29 7470 [Note] InnoDB: Highest supported file format is Barracuda.
2019-05-07 18:43:29 7470 [Note] InnoDB: Log scan progressed past the checkpoint lsn 32043639287
2019-05-07 18:43:29 7470 [Note] InnoDB: Database was not shutdown normally!
2019-05-07 18:43:29 7470 [Note] InnoDB: Starting crash recovery.
2019-05-07 18:43:29 7470 [Note] InnoDB: Reading tablespace information from the .ibd files...
2019-05-07 18:43:29 7470 [Note] InnoDB: Restoring possible half-written data pages 
2019-05-07 18:43:29 7470 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 32043826007
2019-05-07 18:43:29 7470 [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 2019-05-07 18:43:29 7f9d0db71700  InnoDB: Assertion failure in thread 140312516695808 in file log0recv.cc line 1159
InnoDB: Failing assertion: !page || (ibool)!!page_is_comp(page) == dict_table_is_comp(index->table)
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.
10:43:29 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=8388608
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 = 68241 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...
56 57 stack_bottom = 0 thread_stack 0x40000
58 59 60 61 62 /usr/local/mysql/bin/mysqld(my_print_stacktrace+0x35)[0x8e59b5]
63 64 65 /usr/local/mysql/bin/mysqld(handle_fatal_signal+0x41b)[0x6529db]
/lib64/libpthread.so.0[0x3854c0f7e0]
/lib64/libc.so.6(gsignal+0x35)[0x3854432495]
66 /lib64/libc.so.6(abort+0x175)[0x3854433c75]
67 68 69 70 71 /usr/local/mysql/bin/mysqld[0x989837]
72 73 74 75 /usr/local/mysql/bin/mysqld[0x98b9eb]
76 77 78 79 /usr/local/mysql/bin/mysqld[0xa4e518]
80 81 82 83 84 /usr/local/mysql/bin/mysqld[0xa8d1ce]
85 86 87 88 /usr/local/mysql/bin/mysqld[0x9fe6e8]
/lib64/libpthread.so.0[0x3854c07aa1]
89 /lib64/libc.so.6(clone+0x6d)[0x38544e8bcd]
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.
190507 18:43:29 mysqld_safe mysqld from pid file /data/MySQL_Data//localhost.localdomain.pid ended

问题分析:应该是数据在断电的时候可能造成innodb数据损坏试着将数据存放目录下ib_logfile0  ib_logfile1两个日志文件做好备份删除掉(先把数据和配置文件备份一下防止乱弄把数据全弄坏了 然后再用副本试着恢复)。重启mysql能启动了,不过是一会就会出现原来的问题。继续查看错误日志

错误如下:

InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
2019-05-07 20:18:49 7f9538cb6720 InnoDB: Error: page 377 log sequence number 1234631105
InnoDB: is in the future! Current system log sequence number 1651734.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
2019-05-07 20:18:49 7f9538cb6720 InnoDB: Error: page 12 log sequence number 25102656673
InnoDB: is in the future! Current system log sequence number 1651734.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
2019-05-07 20:18:49 7f9538cb6720 InnoDB: Error: page 614 log sequence number 25102656673
InnoDB: is in the future! Current system log sequence number 1651734.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html
InnoDB: for more information.
2019-05-07 20:18:49 24168 [Note] InnoDB: Waiting for purge to start
2019-05-07 20:18:49 7f950d86d700  InnoDB: Assertion failure in thread 140278153795328 in file trx0purge.cc line 699
InnoDB: Failing assertion: purge_sys->iter.trx_no <= purge_sys->rseg->last_trx_no
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.
12:18:49 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=8388608
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 = 68241 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/local/mysql/bin/mysqld(my_print_stacktrace+0x35)[0x8e59b5]
/usr/local/mysql/bin/mysqld(handle_fatal_signal+0x41b)[0x6529db]
/lib64/libpthread.so.0[0x3854c0f7e0]
/lib64/libc.so.6(gsignal+0x35)[0x3854432495]
/lib64/libc.so.6(abort+0x175)[0x3854433c75]
/usr/local/mysql/bin/mysqld[0xa09a92]
/usr/local/mysql/bin/mysqld[0xa0a5f4]
/usr/local/mysql/bin/mysqld[0xa0af03]
/usr/local/mysql/bin/mysqld[0x9fcbf6]
/lib64/libpthread.so.0[0x3854c07aa1]
/lib64/libc.so.6(clone+0x6d)[0x38544e8bcd]
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.
190507 20:18:49 mysqld_safe mysqld from pid file /data/MySQL_Data/localhost.localdomain.pid ended

innoDB是可以启动的,说日志序列号和ibdata文件中的不匹配!继续删除数据存放目录下ibdata1文件(删除前做好备份)

执行service mysqld start 启动正常……

启动完毕后之前的数据库会有问题,需要重新把备份的数据重新还原下就好了

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值