我的 MySQL 服务器刚刚崩溃,我无法重新启动/恢复它。我尝试过:
/etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
和
mysqld --verbose --innodb_force_recovery=4
120528 18:44:28 [Warning] '--log_slow_queries' is deprecated and will be removed in a future release. Please use ''--slow_query_log'/'--slow_query_log_file'' instead.
120528 18:44:28 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
120528 18:44:28 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
120528 18:44:29 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...
Killed
两者(如您所见)均未成功。
我检查了 和 的日志文件/var/log/mysql
,/var/log/mysql.err
但/var/log/mysql.log
它们都是空的。我没有其他想法。有什么建议吗?
答案1
检查运行它的硬件;可能是内存或 CPU 有问题(是什么导致它崩溃的?)。您可能还遇到了 mysql 错误。如果是这种情况,您可以尝试更新 mysql(我建议只更新次要版本)。
我的第一步是 memtest86。