公司的磁盘损坏,通过数据修复把数据库文件拷贝了出来。启动mysql后
select几个INNODB表都是ERROR 1033 (HY000): Incorrect information in file: './blog/bg_blog.frm'
使用InnoDB-force-recovery=4,然后使用mysqldump提示信息:mysqldump: Got error: 1033: Incorrect information in file: './blog/bg_blog.frm' when using LOCK TABLES
show enginesv\G 显示InnoDB引擎DISABLED关闭的
在配置文件中设置InnoDB相关选项
#skip-innodb
default_storage_engine=innodb
后则不能启动mysql,日志信息为:
100524 9:47:54 [Note] /usr/libexec/mysqld: Normal shutdown100524 9:47:54 [Note] /usr/libexec/mysqld: Shutdown complete100524 09:47:54 mysqld ended100524 09:47:55 mysqld started
InnoDB: Error: log file ./ib_logfile0 is of different size 0 10485760 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
100524 9:47:55 [ERROR] Default storage engine (InnoDB) is not available
100524 9:47:55 [ERROR] Aborting100524 9:47:55 [Note] /usr/libexec/mysqld: Shutdown complete100524 09:47:55 mysqld ended
==========================================================
然后再配置文件中取消
#default_storage_engine=innodb
提示错误为
InnoDB: bounds; space id 0 page number 615029, page 125 in doublewrite buf.
InnoDB: Warning: a page in the doublewrite buffer is not within space
InnoDB: bounds; space id 0 page number 615030, page 126 in doublewrite buf.
InnoDB: Warning: a page in the doublewrite buffer is not within space
InnoDB: bounds; space id 0 page number 615031, page 127 in doublewrite buf.
InnoDB: Error: trying to access page number 64898 in space 0,
InnoDB: space name ./ibdata1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
100524 9:51:06InnoDB: Assertion failure in thread 47485830380144 in file fil0fil.c line 3959
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.0/en/forcing-recovery.html
InnoDB: about forcing recovery.
100524 9:51:06 - 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=0
read_buffer_size=131072
max_used_connections=0
max_connections=100
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 217599 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.thd=(nil)
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...
frame pointer is NULL, did you compile with
-fomit-frame-pointer? Aborting backtrace!
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.
100524 09:51:06 mysqld ended很急,请各位路过的大侠,能帮则帮,路过的也帮忙吆喝一声,鄙人跪谢
select几个INNODB表都是ERROR 1033 (HY000): Incorrect information in file: './blog/bg_blog.frm'
使用InnoDB-force-recovery=4,然后使用mysqldump提示信息:mysqldump: Got error: 1033: Incorrect information in file: './blog/bg_blog.frm' when using LOCK TABLES
show enginesv\G 显示InnoDB引擎DISABLED关闭的
在配置文件中设置InnoDB相关选项
#skip-innodb
default_storage_engine=innodb
后则不能启动mysql,日志信息为:
100524 9:47:54 [Note] /usr/libexec/mysqld: Normal shutdown100524 9:47:54 [Note] /usr/libexec/mysqld: Shutdown complete100524 09:47:54 mysqld ended100524 09:47:55 mysqld started
InnoDB: Error: log file ./ib_logfile0 is of different size 0 10485760 bytes
InnoDB: than specified in the .cnf file 0 5242880 bytes!
100524 9:47:55 [ERROR] Default storage engine (InnoDB) is not available
100524 9:47:55 [ERROR] Aborting100524 9:47:55 [Note] /usr/libexec/mysqld: Shutdown complete100524 09:47:55 mysqld ended
==========================================================
然后再配置文件中取消
#default_storage_engine=innodb
提示错误为
InnoDB: bounds; space id 0 page number 615029, page 125 in doublewrite buf.
InnoDB: Warning: a page in the doublewrite buffer is not within space
InnoDB: bounds; space id 0 page number 615030, page 126 in doublewrite buf.
InnoDB: Warning: a page in the doublewrite buffer is not within space
InnoDB: bounds; space id 0 page number 615031, page 127 in doublewrite buf.
InnoDB: Error: trying to access page number 64898 in space 0,
InnoDB: space name ./ibdata1,
InnoDB: which is outside the tablespace bounds.
InnoDB: Byte offset 0, len 16384, i/o type 10.
InnoDB: If you get this error at mysqld startup, please check that
InnoDB: your my.cnf matches the ibdata files that you have in the
InnoDB: MySQL server.
100524 9:51:06InnoDB: Assertion failure in thread 47485830380144 in file fil0fil.c line 3959
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.0/en/forcing-recovery.html
InnoDB: about forcing recovery.
100524 9:51:06 - 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=0
read_buffer_size=131072
max_used_connections=0
max_connections=100
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 217599 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.thd=(nil)
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...
frame pointer is NULL, did you compile with
-fomit-frame-pointer? Aborting backtrace!
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.
100524 09:51:06 mysqld ended很急,请各位路过的大侠,能帮则帮,路过的也帮忙吆喝一声,鄙人跪谢
[mysqld]
datadir=/data/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
innodb_force_recovery=2
#key_buffer_size=2048M
#read_buffer_size=131072
#max_connections=100
#threads_connected=8
#innodb_log_file_size=10M
#innodb_thread_concurrency=8
#max_allowed_packet=16M
#innodb_buffer_pool_size=2G
#skip-innodb
#default_storage_engine=innodb[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
你的ibdata* 文件有没有恢复过来?
-rw-rw-r-- 1 mysql mysql 10M Feb 21 2009 ibdata1
-rw-rw---- 1 mysql mysql 5.0M May 24 09:51 ib_logfile0
-rw-rw---- 1 mysql mysql 5.0M May 24 09:51 ib_logfile1
之前只是对几个大的表转变成了InnoDB表,但是现在ibdata1文件只有10M很奇怪。
drwxr-xr-x 2 mysql mysql 12K Jul 13 2009 bh
drwxr-xr-x 2 mysql mysql 4.0K Apr 24 14:35 blog
drwxr-xr-x 2 mysql mysql 12K Feb 5 15:48 cmdrh
drwxr-xr-x 2 mysql mysql 20K Feb 22 2009 cna963
drwxr-xr-x 2 mysql mysql 4.0K Feb 19 2009 cna963_blog
drwxr-xr-x 2 mysql mysql 12K Aug 26 2009 ellea
-rw-rw-r-- 1 mysql mysql 10M Feb 21 2009 ibdata1
-rw-rw---- 1 mysql mysql 5.0M May 24 09:51 ib_logfile0
-rw-rw---- 1 mysql mysql 5.0M May 24 09:51 ib_logfile1
drwxr-xr-x 2 mysql mysql 4.0K Feb 18 2009 mysql
drwxr-xr-x 2 mysql mysql 12K Apr 16 16:52 office
drwxr-xr-x 2 mysql mysql 20K Dec 26 15:40 phpwind
drwxr-xr-x 2 mysql mysql 12K Apr 24 09:42 phpwind_bbs
drwxr-xr-x 2 mysql mysql 12K Feb 19 2009 phpwind_bbs7
drwxr-xr-x 2 mysql mysql 12K Feb 21 2009 phpwind_bbs_data
-rw-r--r-- 1 mysql mysql 144M Apr 16 20:22 #sql_170c_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 16 20:21 #sql_170c_0.MYI
-rw-r--r-- 1 mysql mysql 48M Apr 18 00:13 #sql_239d_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 00:13 #sql_239d_0.MYI
-rw-r--r-- 1 mysql mysql 81M Apr 16 22:08 #sql_23e8_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 16 22:05 #sql_23e8_0.MYI
-rw-r--r-- 1 mysql mysql 384M Apr 18 00:34 #sql_279b_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 00:28 #sql_279b_0.MYI
-rw-r--r-- 1 mysql mysql 176M Apr 16 22:26 #sql_28bb_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 16 22:22 #sql_28bb_0.MYI
-rw-r--r-- 1 mysql mysql 32M Apr 18 17:43 #sql_29a8_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 17:42 #sql_29a8_0.MYI
-rw-r--r-- 1 mysql mysql 176M Apr 18 00:52 #sql_2bf8_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 00:49 #sql_2bf8_0.MYI
-rw-r--r-- 1 mysql mysql 32M Apr 17 15:48 #sql_2f44_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 15:47 #sql_2f44_0.MYI
-rw-r--r-- 1 mysql mysql 48M Apr 16 22:49 #sql_302c_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 16 22:49 #sql_302c_0.MYI
-rw-r--r-- 1 mysql mysql 64M Apr 18 01:11 #sql_311b_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 01:10 #sql_311b_0.MYI
-rw-r--r-- 1 mysql mysql 28M Apr 16 23:34 #sql_3bf7_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 16 23:33 #sql_3bf7_0.MYI
-rw-r--r-- 1 mysql mysql 123M Apr 18 02:40 #sql_3ccf_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 02:38 #sql_3ccf_0.MYI
-rw-r--r-- 1 mysql mysql 48M Apr 16 23:39 #sql_3ebe_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 16 23:39 #sql_3ebe_0.MYI
-rw-r--r-- 1 mysql mysql 128M Apr 17 17:08 #sql_3f58_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 17:07 #sql_3f58_0.MYI
-rw-r--r-- 1 mysql mysql 80M Apr 16 23:54 #sql_4159_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 16 23:53 #sql_4159_0.MYI
-rw-r--r-- 1 mysql mysql 112M Apr 18 19:46 #sql_4256_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 19:44 #sql_4256_0.MYI
-rw-r--r-- 1 mysql mysql 38M Apr 18 03:34 #sql_42a8_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 03:33 #sql_42a8_0.MYI
-rw-r--r-- 1 mysql mysql 80M Apr 18 03:40 #sql_441f_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 03:39 #sql_441f_0.MYI
-rw-r--r-- 1 mysql mysql 48M Apr 19 11:16 #sql_4559_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 19 11:15 #sql_4559_0.MYI
-rw-r--r-- 1 mysql mysql 80M Apr 17 17:42 #sql_479e_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 17:41 #sql_479e_0.MYI
-rw-r--r-- 1 mysql mysql 304M Apr 17 17:53 #sql_4949_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 17:48 #sql_4949_0.MYI
-rw-r--r-- 1 mysql mysql 16M Apr 19 11:30 #sql_4a66_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 19 11:30 #sql_4a66_0.MYI
-rw-r--r-- 1 mysql mysql 320M Apr 18 20:50 #sql_4cd1_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 20:43 #sql_4cd1_0.MYI
-rw-r--r-- 1 mysql mysql 64M Apr 17 18:12 #sql_4cf5_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 18:11 #sql_4cf5_0.MYI
-rw-r--r-- 1 mysql mysql 240M Apr 17 01:36 #sql_5354_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 01:33 #sql_5354_0.MYI
-rw-r--r-- 1 mysql mysql 63M Apr 17 19:15 #sql_551a_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 19:13 #sql_551a_0.MYI
-rw-r--r-- 1 mysql mysql 80M Apr 17 01:42 #sql_55b0_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 01:41 #sql_55b0_0.MYI
-rw-r--r-- 1 mysql mysql 160M Apr 17 01:54 #sql_5902_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 01:53 #sql_5902_0.MYI
-rw-r--r-- 1 mysql mysql 208M Apr 17 19:47 #sql_596d_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 19:42 #sql_596d_0.MYI
-rw-r--r-- 1 mysql mysql 48M Apr 17 19:47 #sql_596d_1.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 19:46 #sql_596d_1.MYI
-rw-r--r-- 1 mysql mysql 224M Apr 17 19:54 #sql_5eb9_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 19:52 #sql_5eb9_0.MYI
-rw-r--r-- 1 mysql mysql 176M Apr 17 02:53 #sql_5f02_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 02:50 #sql_5f02_0.MYI
-rw-r--r-- 1 mysql mysql 192M Apr 17 03:13 #sql_60e9_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 03:07 #sql_60e9_0.MYI
-rw-r--r-- 1 mysql mysql 352M Apr 17 03:21 #sql_6351_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 03:17 #sql_6351_0.MYI
-rw-r--r-- 1 mysql mysql 144M Apr 18 22:40 #sql_65cf_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 18 22:38 #sql_65cf_0.MYI
-rw-r--r-- 1 mysql mysql 80M Apr 17 20:42 #sql_6a88_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 20:41 #sql_6a88_0.MYI
-rw-r--r-- 1 mysql mysql 190M Apr 17 05:55 #sql_6b9b_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 05:48 #sql_6b9b_0.MYI
-rw-r--r-- 1 mysql mysql 112M Apr 17 20:53 #sql_6d70_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 20:51 #sql_6d70_0.MYI
-rw-r--r-- 1 mysql mysql 160M Apr 17 21:03 #sql_700a_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 21:01 #sql_700a_0.MYI
-rw-r--r-- 1 mysql mysql 336M Apr 17 11:13 #sql_7799_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 17 11:10 #sql_7799_0.MYI
-rw-r--r-- 1 mysql mysql 133M Apr 16 18:53 #sql_b7c_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 16 18:50 #sql_b7c_0.MYI
-rw-r--r-- 1 mysql mysql 96M Apr 19 08:25 #sql_f78_0.MYD
-rw-r--r-- 1 mysql mysql 1.0K Apr 19 08:24 #sql_f78_0.MYI
drwxr-xr-x 2 mysql mysql 20K Apr 7 21:36 ss63
drwxr-xr-x 2 mysql mysql 16K Jul 1 2009 study
drwxr-xr-x 2 mysql mysql 4.0K Feb 22 2009 test2
drwxr-xr-x 2 mysql mysql 12K Nov 10 2009 wg
drwxr-xr-x 2 mysql mysql 4.0K Jul 15 2009 x001
drwxr-xr-x 2 mysql mysql 4.0K Apr 6 2009 xc
看来,定期备份真的很关键啊。