phpMyAdmin/nginx: 502 bad gateway 解決記錄

  今天開機運行Nginx準備作本地測試,瀏覽器打開 phpMyAdmin 後提示 Nginx 進程崩潰。打開Nginx錯誤日誌「error.log」沒有任何有效信息。而後打開了phpMyAdmin的錯誤日誌「***-PC.err」,提取有效信息以下:php

140920 19:34:27 [Note] InnoDB: Using mutexes to ref count buffer pool pageshtml

140920 19:34:27 [Note] InnoDB: The InnoDB memory heap is disabledmysql

140920 19:34:27 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functionssql

140920 19:34:27 [Note] InnoDB: Compressed tables use zlib 1.2.3數據庫

140920 19:34:27 [Note] InnoDB: Not using CPU crc32 instructions瀏覽器

140920 19:34:27 [Note] InnoDB: Initializing buffer pool, size = 128.0Mapp

140920 19:34:27 [Note] InnoDB: Completed initialization of buffer pool測試

140920 19:34:27 [Note] InnoDB: Highest supported file format is Barracuda.網站

140920 19:34:27 [Note] InnoDB: The log sequence numbers 5900060 and 5900060 in ibdata files do not match the log sequence number 6080247 in the ib_logfiles!spa

140920 19:34:27 [Note] InnoDB: Database was not shutdown normally!

140920 19:34:27 [Note] InnoDB: Starting crash recovery.

140920 19:34:27 [Note] InnoDB: Reading tablespace information from the .ibd files...

2014-09-20 19:34:27 ec4  InnoDB: Operating system error number 2 in a file operation.

InnoDB: Some operating system error numbers are described at

InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html

InnoDB: Error: could not open single-table tablespace file .\dota2\data_abilities - 

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.

  能夠看到錯誤代碼爲2,查了一下MySQL官方網站的錯誤代碼描述是「No such file or directory」。再回到錯誤日誌,錯誤代碼的上一句是「Reading tablespace information from the .ibd files...」,下一句是「Error: could not open single-table tablespace file .\dota2\data_abilities -」。能夠看出錯誤與數據庫 .\dota2\ 目錄下的 *.ibd 文件有關。打開該目錄,果真有一個以前手動備份的文件 data_abilities - 副本.ibd。刪除之,重啓 Nginx 和 MySQL,再次打開 phpMyAdmin,恢復正常。

相關文章
相關標籤/搜索