我的MySQL服务器没有启动。当我检查error.log文件时发现了这个。你能建议我怎么做吗?
151113 6:59:53 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
151113 6:59:53 [Note] Plugin 'FEDERATED' is disabled.
151113 6:59:53 InnoDB: The InnoDB memory heap is disabled
151113 6:59:53 InnoDB: Mutexes and rw_locks use GCC atomic builtins
151113 6:59:53 InnoDB: Compressed tables use zlib 1.2.3.4
151113 6:59:53 InnoDB: Initializing buffer pool, size = 128.0M
151113 6:59:53 InnoDB: Completed initialization of buffer pool
InnoDB: Error: checksum mismatch in data file ./ibdata1
151113 6:59:53 InnoDB: Could not open or create data files.
151113 6:59:53 InnoDB: If you tried to add new data files, and it failed here,
151113 6:59:53 InnoDB: you should now edit innodb_data_file_path in my.cnf back
151113 6:59:53 InnoDB: to what it was, and remove the new ibdata files InnoDB created
151113 6:59:53 InnoDB: in this failed attempt. InnoDB only wrote those files full of
151113 6:59:53 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
151113 6:59:53 InnoDB: remove old data files which contain your precious data!
151113 6:59:53 [ERROR] Plugin 'InnoDB' init function returned error.
151113 6:59:53 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
151113 6:59:53 [ERROR] Unknown/unsupported storage engine: InnoDB
151113 6:59:53 [ERROR] Aborting
151113 6:59:53 [Note] /usr/sbin/mysqld: Shutdown complete
最佳答案
我刚刚遇到这个问题,最初在dmesg
日志中显示为“mysql respawning too fast”错误。
从reading elsewhere我追踪到你发现的东西,我认为这表明InnoDB的元数据文件中存在某种损坏。InnoDB做一些事情,比如确保事务/回滚完整性和主外键完整性。这就是“校验和不匹配”错误警告您的原因。
你没有说你是如何启动mysqld的,但也许你在/etc/init.d/mysqld start
或service mysqld start
上使用了一些变体。改为以命令的形式显式运行守护程序:
sudo /usr/sbin/mysqld --innodb_force_recovery 0
而且,只要知道为什么要这样做,就逐渐增加
--innodb_force_recovery
的零值,直到过程开始。警告:innodb_force_recovery参数决定mysqld试图“强制修复”InnoDB存储中的校验和错误的严重程度。因此,如果您在这里用一个很高的数字强制fix,您可能会使问题变得更糟,或者需要稍后的索引重建,因为InnoDB会做越来越多的激烈的事情来尝试修复自己。
每次使用特定的数字(例如
mysqld
)重新启动2
失败时,应在将其增加到3
之前搜索收到的错误消息,以便确保所做的操作正确。我不是你可能遇到的每一个错误的专家,所以我不能为每一个异常情况提供反馈:我要说的是,小心使用--innodb_force_recovery
!关于php - Mysql/InnoDB在Linode服务器上停止工作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/33706106/