2015-10-19 274 views
0

最近由於數字海洋的維護關閉,我的生產服務器已損壞。當我們試圖恢復我們的數據庫時,我們無法訪問我們的液滴。不知何故,我們設法恢復這些(ibdata1,ib_logfile0,ib_logfile1和一些.frm)文件。當我將這些文件複製到我的新的mysql服務器(在另一臺機器上)時,我無法啓動mysql服務器。我得到這個輸出從ibdata1,ib_logfile0,ib_logfile1和.frm文件恢復數據庫

sudo service mysql restart 
mysql stop/waiting 
start: Job failed to start 

我檢查日誌文件,我得到這個錯誤,

151019 8:55:27 [Warning] Using unique option prefix myisam-recover instead of $ 
151019 8:55:27 [Note] Plugin 'FEDERATED' is disabled. 
151019 8:55:27 InnoDB: The InnoDB memory heap is disabled 
151019 8:55:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
151019 8:55:27 InnoDB: Compressed tables use zlib 1.2.8 
151019 8:55:27 InnoDB: Using Linux native AIO 
151019 8:55:27 InnoDB: Initializing buffer pool, size = 128.0M 
151019 8:55:27 InnoDB: Completed initialization of buffer pool 
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes 
InnoDB: than specified in the .cnf file 0 5242880 bytes! 
151019 8:55:27 [ERROR] Plugin 'InnoDB' init function returned error. 
151019 8:55:27 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 
151019 8:55:27 [ERROR] Unknown/unsupported storage engine: InnoDB 
151019 8:55:27 [ERROR] Aborting 

151019 8:55:27 [Note] /usr/sbin/mysqld: Shutdown complete 

151019 8:55:28 [Warning] Using unique option prefix myisam-recover instead of $ 
151019 8:55:28 [Note] Plugin 'FEDERATED' is disabled. 
151019 8:55:28 InnoDB: The InnoDB memory heap is disabled 
151019 8:55:28 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
151019 8:55:28 InnoDB: Compressed tables use zlib 1.2.8 
151019 8:55:28 InnoDB: Using Linux native AIO 
151019 8:55:28 InnoDB: Initializing buffer pool, size = 128.0M 
151019 8:55:28 InnoDB: Completed initialization of buffer pool 
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes 
InnoDB: than specified in the .cnf file 0 5242880 bytes! 
151019 8:55:28 [ERROR] Plugin 'InnoDB' init function returned error. 
151019 8:55:28 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 
151019 8:55:28 [ERROR] Unknown/unsupported storage engine: InnoDB 
151019 8:55:28 [ERROR] Aborting 

151019 8:55:28 [Note] /usr/sbin/mysqld: Shutdown complete 

151019 8:55:29 [Warning] Using unique option prefix myisam-recover instead of $ 
151019 8:55:29 [Note] Plugin 'FEDERATED' is disabled. 
151019 8:55:29 InnoDB: The InnoDB memory heap is disabled 
151019 8:55:29 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
151019 8:55:29 InnoDB: Compressed tables use zlib 1.2.8 
151019 8:55:29 InnoDB: Using Linux native AIO 
151019 8:55:29 InnoDB: Initializing buffer pool, size = 128.0M 
151019 8:55:29 InnoDB: Completed initialization of buffer pool 
InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes 
InnoDB: than specified in the .cnf file 0 5242880 bytes! 
151019 8:55:29 [ERROR] Plugin 'InnoDB' init function returned error. 
151019 8:55:29 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. 
151019 8:55:29 [ERROR] Unknown/unsupported storage engine: InnoDB 
151019 8:55:29 [ERROR] Aborting 

151019 8:55:29 [Note] /usr/sbin/mysqld: Shutdown complete 

我嘗試添加innodb_log_file_size= 50331648通過@akuzminsky

的建議。然後我得到這個錯誤日誌。

151022 6:54:13 [Warning] Using unique option prefix myisam-recover instead of $ 
151022 6:54:13 [Note] Plugin 'FEDERATED' is disabled. 
151022 6:54:13 InnoDB: The InnoDB memory heap is disabled 
151022 6:54:13 InnoDB: Mutexes and rw_locks use GCC atomic builtins 
151022 6:54:13 InnoDB: Compressed tables use zlib 1.2.8 
151022 6:54:13 InnoDB: Using Linux native AIO 
151022 6:54:13 InnoDB: Initializing buffer pool, size = 128.0M 
151022 6:54:13 InnoDB: Completed initialization of buffer pool 
151022 6:54:13 InnoDB: highest supported file format is Barracuda. 
InnoDB: Log scan progressed past the checkpoint lsn 15379293 
151022 6:54:13 InnoDB: Database was not shut down normally! 
InnoDB: Starting crash recovery. 
InnoDB: Reading tablespace information from the .ibd files... 
InnoDB: Error: space header page consists of zero bytes in file ./toucan/ormcli$ 
InnoDB: Error: space header page consists of zero bytes in file ./toucan/catego$ 
InnoDB: Error: space header page consists of zero bytes in file ./toucan/survey$ 
InnoDB: Error: space header page consists of zero bytes in file ./toucan/compla$ 
InnoDB: Restoring possible half-written data pages from the doublewrite 
InnoDB: buffer... 
InnoDB: Doing recovery: scanned up to log sequence number 15382291 
InnoDB: Page directory corruption: infimum not pointed to 
151022 6:54:13 InnoDB: Page dump in ascii and hex (16384 bytes): 
len 16384; hex 10cfd0d80000000000000000000000000000000000e9e915000800000000001$ 
InnoDB: End of page dump 
151022 6:54:13 InnoDB: Page checksum 282054872, prior-to-4.0.14-form checksum$ 
InnoDB: stored checksum 282054872, prior-to-4.0.14-form stored checksum 3468306$ 
InnoDB: Page lsn 0 15329557, low 4 bytes of lsn at page end 15329557 
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 file space header page 
10:54:13 UTC - mysqld got signal 11 ; 
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=16777216 
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 = 346701 K $ 
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 0x30000 
/usr/sbin/mysqld(my_print_stacktrace+0x20)[0x7fa4d90e2f10] 
/usr/sbin/mysqld(handle_fatal_signal+0x3d5)[0x7fa4d8fcd175] 
/lib/x86_64-linux-gnu/libpthread.so.0(+0x10340)[0x7fa4d7d5d340] 
/usr/sbin/mysqld(+0x5f058a)[0x7fa4d91e258a] 
/usr/sbin/mysqld(+0x56c44e)[0x7fa4d915e44e] 
/usr/sbin/mysqld(+0x576137)[0x7fa4d9168137] 
/usr/sbin/mysqld(+0x5a5632)[0x7fa4d9197632] 
/usr/sbin/mysqld(+0x5a6699)[0x7fa4d9198699] 
/usr/sbin/mysqld(+0x591ad3)[0x7fa4d9183ad3] 
/usr/sbin/mysqld(+0x542a1a)[0x7fa4d9134a1a] 
/usr/sbin/mysqld(+0x511d48)[0x7fa4d9103d48] 
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x41)[0x7fa4d8fcf$ 
/usr/sbin/mysqld(+0x302221)[0x7fa4d8ef4221] 
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0x92a)[0x7fa4d8ef821a] 
/usr/sbin/mysqld(+0x28ac5b)[0x7fa4d8e7cc5b] 
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x45b)[0x7fa4d8e815db] 
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fa4d739fec5] 
/usr/sbin/mysqld(+0x286b18)[0x7fa4d8e78b18] 
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. 

請幫我解決這個問題。 在此先感謝。

回答

0

注意線路中的錯誤日誌:

InnoDB: Error: log file ./ib_logfile0 is of different size 0 50331648 bytes 
InnoDB: than specified in the .cnf file 0 5242880 bytes! 
The actual size of the redo log file differs from the size in MySQL config. 

添加此行到my.cnf文件

innodb_log_file_size= 50331648 

如果表已損壞,您仍然有治癒它。但至少MySQL不會停止在這一步。

+0

我試着添加。現在我得到了不同的錯誤。我更新了幾個問題,請檢查 – ponraj

+0

不,請將其設置爲文件的大小。如果您需要更改大小,請參閱http://dba.stackexchange.com/questions/1261/how-to-safely-change-mysql-innodb-variable-innodb-log-file-size/4103#4103 –