免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3424 | 回复: 5
打印 上一主题 下一主题

marked as crashed and should be repaired [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-06-08 14:51 |只看该作者 |倒序浏览
今天优化了一下表,发现数据库被锁了,于是我登录上去kill 相关进程,kill不了,于是我重启了mysql服务器
事后就发现出问题了

marked as crashed and should be repaired
这是错误日志里的

论坛徽章:
0
2 [报告]
发表于 2009-06-08 15:21 |只看该作者
给多点日志 ,不要所有的表都优化,有碎片的再优化,大表不要做优化,MYISAM会锁表,KILL 线程会损坏数据文件的内部信息,你现在只有repair 表了

论坛徽章:
0
3 [报告]
发表于 2009-06-08 15:42 |只看该作者
我遇到过一次,修复之后里面的东西也没有了,最后全备修复的.

论坛徽章:
0
4 [报告]
发表于 2009-06-08 15:45 |只看该作者
我现在比较晕的是,现在我不确认我已经处理好机器了
thd: 0x2aaf3f110000
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 = 0x40143f00 thread_stack 0x30000
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x2aaf5f6d2210 is an invalid pointer
thd->thread_id=14074
thd->killed=NOT_KILLED
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.
090608 14:54:38 mysqld_safe Number of processes running now: 0
090608 14:54:38 mysqld_safe mysqld restarted
090608 14:54:38 [Warning] option 'max_allowed_packet': unsigned value 10737418240 adjusted to 1073741824
090608 14:54:38 [Warning] option 'max_binlog_size': unsigned value 2147483648 adjusted to 1073741824
090608 14:54:38 [Warning] The syntax '--log' is deprecated and will be removed in MySQL 7.0. Please use '--general_log'/'--general_log_file' instead.
090608 14:54:38 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '--slow_query_log'/'--slow_query_log_file' instead.
090608 14:54:38 [Warning] The syntax 'for replication startup options' is deprecated and will be removed in MySQL 5.2. Please use 'CHANGE MASTER' instead.
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 1664 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 32768 pages, max 0 (relevant if non-zero) pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
090608 14:54:40 [ERROR] Plugin 'InnoDB' init function returned error.
090608 14:54:40 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
090608 14:54:40 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=LNGHKGSQLP05-relay-bin' to avoid this problem.
090608 14:54:40 [Note] Event Scheduler: Loaded 0 events
090608 14:54:40 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.32-enterprise-gpl-advanced-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Enterprise Server - Advanced Edition (GPL)
090608 14:54:40 [ERROR] /usr/sbin/mysqld: Table './newlaw/ex_users' is marked as crashed and should be repaired

论坛徽章:
0
5 [报告]
发表于 2009-06-08 15:47 |只看该作者
我现在整个库我都check了一下,目前是正常了,我担心数据会有丢失

论坛徽章:
0
6 [报告]
发表于 2009-06-08 21:32 |只看该作者
可先备份,在做optimize 操作。

有点疑问:
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
是不是更改过innodb文件的大小?
另外是不是改过机器的名字?
你现在的MySQL好象Innodb没加载正确。
可以去确认一下。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP