簡體   English   中英

PC崩潰后Xampp MySQL Innodb恢復失敗

[英]Xampp mysql innodb recovery failed after pc crash

所以我遇到了幾次這個問題。 我不知道為什么會這樣,我只是重啟PC mysql后就無法啟動。

所以我重新安裝了xampp並弄亂了好幾次,直到我開始工作為止。 上次發生這種情況時,我查看了mysql.err文件,發現錯誤與損壞的文件有關。 所以我刪除了那些數據庫,mysql開始了

但是今天我看到了正確的理由。 當它突然凍結並重新啟動時,我正坐在電腦旁。 之后,mysql將無法啟動。

查看我的localhost / xampp狀態頁,它說mysql已停用

去檢查日志,實際上是mysql.err文件,那里說從崩潰中恢復,而innodb無法從崩潰中恢復。

這是日志

2014-03-05 11:18:11 7829 mysqld_safe Starting mysqld daemon with databases from  /opt/lampp/var/mysql
2014-03-05 11:18:11 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
2014-03-05 11:18:11 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2014-03-05 11:18:11 8235 [Note] Plugin 'FEDERATED' is disabled.
2014-03-05 11:18:11 8235 [Note] InnoDB: The InnoDB memory heap is disabled
2014-03-05 11:18:11 8235 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2014-03-05 11:18:11 8235 [Note] InnoDB: Compressed tables use zlib 1.2.8
2014-03-05 11:18:11 8235 [Note] InnoDB: Not using CPU crc32 instructions
2014-03-05 11:18:11 8235 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2014-03-05 11:18:11 8235 [Note] InnoDB: Completed initialization of buffer pool
2014-03-05 11:18:11 8235 [Note] InnoDB: Highest supported file format is Barracuda.
2014-03-05 11:18:11 8235 [Note] InnoDB: The log sequence numbers 11011943 and 11011943 in ibdata files do not match the log sequence number 11012198 in the ib_logfiles!
2014-03-05 11:18:11 8235 [Note] InnoDB: Database was not shutdown normally!
2014-03-05 11:18:11 8235 [Note] InnoDB: Starting crash recovery.
2014-03-05 11:18:11 8235 [Note] InnoDB: Reading tablespace information from the .ibd   files...
2014-03-05 11:18:11 8235 [ERROR] InnoDB: Attempted to open a previously opened  tablespace. Previous tablespace wpdemo/wp_terms uses space ID: 93 at filepath: ./wpdemo/wp_terms.ibd. Cannot open tablespace wordpress/wp_evg_feeds which uses space ID: 93 at filepath: ./wordpress/wp_evg_feeds.ibd
2014-03-05 11:18:11 7f3ca4a11700  InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
InnoDB: If you are installing InnoDB, remember that you must create
InnoDB: directories yourself, InnoDB does not create them.
InnoDB: Error: could not open single-table tablespace file ./wordpress/wp_evg_feeds.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.
2014-03-05 11:18:11 7829 mysqld_safe mysqld from pid file /opt/lampp/var/mysql/aleksandar-PC.pid ended

上次出現錯誤時,我沒有意識到這是由於PC崩潰而導致的,我不需要文件,所以我只刪除了損壞的數據庫文件,然后啟動了mysql。 現在的問題是我無法刪除任何文件,我需要這些數據庫才能正常工作。 有什么建議么?

因此,將重命名的文件重命名為wp_terms.ibd.bkp,這樣mysql可以跳過這些表並啟動。 現在,當mysql恢復並啟動時,我會定期關閉它。 而不是將.bkp文件重命名為普通表文件,然后啟動了mysql。 現在,當mysql定期關閉時,它將不會檢查恢復並正常啟動。 應該被破壞的文件現在正在工作。 一切恢復正常。 真是邏輯!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM