从ibdata和frm恢复MySQL

时间:2017-06-28 22:09:47

标签: mysql sql innodb recovery

由于InnoDB损坏,我的MySQL服务器拒绝启动。谷歌搜索后,我能够以恢复模式启动服务器(--innodb_force_recovery = 3到6允许启动服务器),但是当我尝试创建一个mysqldump时,我选择一个表时会出错。

2017-06-28 23:59:25 7f33945d7700  InnoDB: Assertion failure in thread 139859509212928 in file btr0pcur.cc line 432
InnoDB: Failing assertion: btr_page_get_prev(next_page, mtr) == buf_block_get_page_no(btr_pcur_get_block(cursor))
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.
22:59:25 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=2147483648
read_buffer_size=4194304
max_used_connections=1
max_threads=151
thread_count=1
connection_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 2756236 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x31adf10
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 = 7f33945d6e18 thread_stack 0x40000
mysqld(my_print_stacktrace+0x35)[0x8e45b5]
mysqld(handle_fatal_signal+0x494)[0x668b64]
/lib64/libpthread.so.0(+0xf500)[0x7f347e506500]
/lib64/libc.so.6(gsignal+0x35)[0x7f347cfa78a5]
/lib64/libc.so.6(abort+0x175)[0x7f347cfa9085]
mysqld[0xa4f323]
mysqld[0x9f2544]
mysqld[0x9f549a]
mysqld[0x953dcc]
mysqld(_ZN7handler13ha_index_nextEPh+0x66)[0x5a8496]
mysqld[0x6c1b8c]
mysqld(_Z10sub_selectP4JOINP13st_join_tableb+0x179)[0x6c5ca9]
mysqld(_ZN4JOIN4execEv+0x3da)[0x6c4aaa]
mysqld(_Z12mysql_selectP3THDP10TABLE_LISTjR4ListI4ItemEPS4_P10SQL_I_ListI8st_orderESB_S7_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x250)[0x7098f0]
mysqld(_Z13handle_selectP3THDP13select_resultm+0x1b7)[0x70a1a7]
mysqld[0x6e405d]
mysqld(_Z21mysql_execute_commandP3THD+0x16b7)[0x6e6ba7]
mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x3c8)[0x6ea428]
mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x13ce)[0x6eb88e]
mysqld(_Z24do_handle_one_connectionP3THD+0xcf)[0x6b748f]
mysqld(handle_one_connection+0x47)[0x6b75b7]
mysqld(pfs_spawn_thread+0x12d)[0xb1c7fd]
/lib64/libpthread.so.0(+0x7851)[0x7f347e4fe851]
/lib64/libc.so.6(clone+0x6d)[0x7f347d05d90d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f338c004f50): is an invalid pointer
Connection ID (thread ID): 1
Status: NOT_KILLED

如果我尝试选择LIMIT,则查询会显示结果但没有LIMIT,查询会崩溃服务器。

我尝试过REPAIR TABLE,OPTIMIZE TABLE,DROP INDEX,ALTER TABLE ENGINE = InnoDB ......没有用。

因此,如果有人知道如何恢复我的数据,我将不胜感激。

0 个答案:

没有答案