码迷,mamicode.com
首页 > Web开发 > 详细

phpMyAdmin/nginx: 502 bad gateway 解决记录

时间:2014-09-22 15:30:43      阅读:358      评论:0      收藏:0      [点我收藏+]

标签:des   style   http   color   io   ar   for   文件   数据   

  今天开机运行Nginx准备做本地测试,浏览器打开 phpMyAdmin 后提示 Nginx 进程崩溃。打开Nginx错误日志“error.log”没有任何有效信息。然后打开了phpMyAdmin的错误日志“***-PC.err”,提取有效信息如下:

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

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

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

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.0M

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!

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,恢复正常。


phpMyAdmin/nginx: 502 bad gateway 解决记录

标签:des   style   http   color   io   ar   for   文件   数据   

原文地址:http://my.oschina.net/nghack/blog/316536

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!