mysqld 启动失败。日志包括

mysqld 启动失败。日志包括

自从我的 mysqld 崩溃以来,我已经研究这个问题几天了...我正在发布我下载的日志,我认为这与文件大小限制有关,但我不太确定。

我也不知道 hmcanada 是什么。

150609 17:48:11 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150609 17:48:11 [Warning] option 'relay_log_space_limit': unsigned value 17179869184 adjusted to 4294967295
150609 17:48:11 [Note] /usr/libexec/mysqld (mysqld 5.5.43) starting as process 29530 ...
150609 17:48:11 [Note] Plugin 'FEDERATED' is disabled.
150609 17:48:11 InnoDB: The InnoDB memory heap is disabled
150609 17:48:11 InnoDB: Mutexes and rw_locks use InnoDB's own implementation
150609 17:48:11 InnoDB: Compressed tables use zlib 1.2.3
150609 17:48:11 InnoDB: Using Linux native AIO
150609 17:48:11 InnoDB: Initializing buffer pool, size = 128.0M
150609 17:48:11 InnoDB: Completed initialization of buffer pool
150609 17:48:11 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 1192812596
150609 17:48:11  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1192881317
150609 17:48:11  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 150609 17:48:11  InnoDB: Error: space id and page n:o stored in the page
InnoDB: read in are 1932485733:539977839, should be 0:1088!
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 1088.
InnoDB: You may have to recover from a backup.
150609 17:48:11  InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; asc e in /home/hmcanada/htdocs/includes/details.php on line 269, referer: http://harmoniamundi.ca/display_review.php?id=71 
 [Mon Mar 30 18:34:35 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined index: review_id in /home/hmcanada/htdocs/view.php on line 65, referer: http://harmoniamundi.ca/display_review.php?id=71 
 [Mon Mar 30 18:34:35 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined index: release_id in /home/hmcanada/htdocs/view.php on line 70, referer: http://harmoniamundi.ca/display_review.php?id=71 
 [Mon Mar 30 18:34:35 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined index: concert_id in /home/hmcanada/htdocs/view.php on line 75, referer: http://harmoniamundi.ca/display_review.php?id=71 
 [Mon Mar 30 18:34:35 2015] [error] [client 104.131.217.158] PHP Warning:  Cannot modify header information - headers already sent by (output started at /home/hmcanada/htdocs/includes/display_handlers.php:172) in /home/hmcanada/htdocs/b2c/config.php on line 2, referer: http://harmoniamundi.ca/display_review.php?id=71 
 [Mon Mar 30 18:34:35 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_reviews in /home/hmcanada/htdocs/view.php on line 143, referer: http://harmoniamundi.ca/display_review.php?id=71 
 [Mon Mar 30 18:34:35 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/view.php on line 177, referer: http://harmoniamundi.ca/display_review.php?id=71 
 [Mon Mar 30 18:34:35 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/view.php on line 231, referer: http://harmoniamundi.ca/display_review.php?id=71 
 [Mon Mar 30 18:34:40 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_id in /home/hmcanada/htdocs/display_review.php on line 42, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:40 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 90, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:40 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_id in /home/hmcanada/htdocs/display_review.php on line 181, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:40 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_image in /home/hmcanada/htdocs/display_review.php on line 181, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:40 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_name in /home/hmcanada/htdocs/display_review.php on line 184, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:40 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 187, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:40 2015] [error] [client 104.131.217.158] PHP Warning:  include(/store/functions.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:40 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening '/store/functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:40 2015] [error] [client 104.131.217.158] PHP Warning:  include(config.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:40 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening 'config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:44 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 90, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:44 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 187, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:44 2015] [error] [client 104.131.217.158] PHP Warning:  include(/store/functions.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:44 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening '/store/functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:44 2015] [error] [client 104.131.217.158] PHP Warning:  include(config.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:44 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening 'config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:50 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_id in /home/hmcanada/htdocs/display_review.php on line 42, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:50 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 90, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:50 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_id in /home/hmcanada/htdocs/display_review.php on line 181, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:50 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_image in /home/hmcanada/htdocs/display_review.php on line 181, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:50 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_name in /home/hmcanada/htdocs/display_review.php on line 184, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:50 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 187, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:50 2015] [error] [client 104.131.217.158] PHP Warning:  include(/store/functions.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:50 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening '/store/functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:50 2015] [error] [client 104.131.217.158] PHP Warning:  include(config.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:50 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening 'config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:55 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 90, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:55 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 187, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:55 2015] [error] [client 104.131.217.158] PHP Warning:  include(/store/functions.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:55 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening '/store/functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:55 2015] [error] [client 104.131.217.158] PHP Warning:  include(config.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:55 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening 'config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:59 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: this_concert_id in /home/hmcanada/htdocs/display_review.php on line 65, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:59 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 66, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:59 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: this_concert_id in /home/hmcanada/htdocs/display_review.php on line 65, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:59 2015] [error] [client 104.131.217.158] PHP Warning:  include(/store/functions.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:59 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening '/store/functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:59 2015] [error] [client 104.131.217.158] PHP Warning:  include(config.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:34:59 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening 'config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:04 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_id in /home/hmcanada/htdocs/display_review.php on line 42, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:04 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 90, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:04 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_id in /home/hmcanada/htdocs/display_review.php on line 181, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:04 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_image in /home/hmcanada/htdocs/display_review.php on line 181, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:04 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: artist_name in /home/hmcanada/htdocs/display_review.php on line 184, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:04 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 187, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:04 2015] [error] [client 104.131.217.158] PHP Warning:  include(/store/functions.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:04 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening '/store/functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:04 2015] [error] [client 104.131.217.158] PHP Warning:  include(config.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:04 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening 'config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:09 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 90, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:09 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 187, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:09 2015] [error] [client 104.131.217.158] PHP Warning:  include(/store/functions.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:09 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening '/store/functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:09 2015] [error] [client 104.131.217.158] PHP Warning:  include(config.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:09 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening 'config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/store/functions.php on line 35, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:14 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: this_concert_id in /home/hmcanada/htdocs/display_review.php on line 65, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:14 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: linked_concerts in /home/hmcanada/htdocs/display_review.php on line 66, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:14 2015] [error] [client 104.131.217.158] PHP Notice:  Undefined variable: this_concert_id in /home/hmcanada/htdocs/display_review.php on line 65, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:14 2015] [error] [client 104.131.217.158] PHP Warning:  include(/store/functions.php): failed to open stream: No such file or directory in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:14 2015] [error] [client 104.131.217.158] PHP Warning:  include(): Failed opening '/store/functions.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/hmcanada/htdocs/includes/footer.php on line 3, referer: http://harmoniamundi.ca/list_reviews.php 
 [Mon Mar 30 18:35:14 2015] [error] [client 104.131.217.158] PHP Warning:  include(config.php): failed to open strea;
InnoDB: End of page dump
150609 17:48:11  InnoDB: Page checksum 3160549759, prior-to-4.0.14-form checksum 2142795346
InnoDB: stored checksum 1696622958, prior-to-4.0.14-form stored checksum 1701716083
InnoDB: Page lsn 1633968431 1752458351, low 4 bytes of lsn at page end 1953654113
InnoDB: Page number (if stored to page already) 539977839,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 1932485733
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 1088.
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.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.
150609 17:48:11  InnoDB: Assertion failure in thread 2790103952 in file buf0buf.c line 3620
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.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
21:48:11 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=67108864
read_buffer_size=1048576
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 = 375899 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 0x30000
/usr/libexec/mysqld(my_print_stacktrace+0x33)[0x8427fe3]
/usr/libexec/mysqld(handle_fatal_signal+0x42b)[0x82d7f1b]
[0xb7708500]
[0xb7708420]
/lib/libc.so.6(gsignal+0x50)[0xb72b2b10]
/lib/libc.so.6(abort+0x101)[0xb72b4421]
/usr/libexec/mysqld[0x852af69]
/usr/libexec/mysqld[0x855dcfd]
/usr/libexec/mysqld[0x84da740]
/lib/libpthread.so.0[0xb76ea912]
/lib/libc.so.6(clone+0x5e)[0xb735f4ae]
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.
150609 17:48:11 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended

答案1

MySQL 错误日志显示以下内容。

InnoDB:InnoDB 表空间损坏。请参阅 InnoDB:http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html InnoDB:关于强制恢复。

您必须考虑 innodb 强制恢复。编辑您的 /etc/my.cnf 并添加 innodb_force_recovery = 1,然后尝试启动 MySQL 服务。以下是完整步骤:

  1. 停止 mysqld。
  2. 备份 /var/lib/mysql/ib*
  3. 在 /etc/my.cnf 中添加以下行

innodb_force_recovery = 1(如果 MySQL 无法启动则从 1 增加到 4)

  1. 重新启动 mysqld。
  2. 转储所有表:# mysqldump -A > dump.sql
  3. 删除所有需要恢复的数据库。
  4. 停止 mysqld。
  5. 删除 /var/lib/mysql/ib*
  6. 在 /etc/my.cnf 中注释掉 innodb_force_recovery
  7. 重新启动 mysqld。查看 mysql 错误日志。默认情况下,它应该是 /var/lib/mysql/server/hostname.com.err,以查看它如何创建新的 ib* 文件。
  8. 从转储中恢复数据库:mysql < dump.sql

相关内容