Php WAMP服务器不适当关闭后呈橙色

Php WAMP服务器不适当关闭后呈橙色,php,mysql,wamp,Php,Mysql,Wamp,由于wamp服务器运行时断电,我的计算机已关闭。现在,当我尝试打开服务器时,它保持橙色,对服务器的http请求正在工作,但当我尝试登录MySQl时,我收到以下错误: #2002 Cannot log in to the MySQL server 我做了一些搜索,所有的结果都是删除它,然后重新安装。还有其他方法吗? 我仍然是一个初学者,所以我不知道我需要向你展示哪些文件来帮助我,请评论我需要展示的任何东西 我在mysql日志中的最后一次登录尝试: 2015-11-11 11:08:03 8052

由于wamp服务器运行时断电,我的计算机已关闭。现在,当我尝试打开服务器时,它保持橙色,对服务器的http请求正在工作,但当我尝试登录MySQl时,我收到以下错误:

#2002 Cannot log in to the MySQL server
我做了一些搜索,所有的结果都是删除它,然后重新安装。还有其他方法吗? 我仍然是一个初学者,所以我不知道我需要向你展示哪些文件来帮助我,请评论我需要展示的任何东西

我在mysql日志中的最后一次登录尝试:

2015-11-11 11:08:03 8052 [Note] Plugin 'FEDERATED' is disabled.
2015-11-11 11:08:03 8052 [Note] InnoDB: The InnoDB memory heap is disabled
2015-11-11 11:08:03 8052 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2015-11-11 11:08:03 8052 [Note] InnoDB: Compressed tables use zlib 1.2.3
2015-11-11 11:08:03 8052 [Note] InnoDB: Not using CPU crc32 instructions
2015-11-11 11:08:03 8052 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-11-11 11:08:03 8052 [Note] InnoDB: Completed initialization of buffer pool
2015-11-11 11:08:03 8052 [Note] InnoDB: Highest supported file format is Barracuda.
2015-11-11 11:08:03 8052 [Note] InnoDB: The log sequence numbers 2671283 and 2671283 in ibdata files do not match the log sequence number 2671293 in the ib_logfiles!
2015-11-11 11:08:03 8052 [Note] InnoDB: Database was not shutdown normally!
2015-11-11 11:08:03 8052 [Note] InnoDB: Starting crash recovery.
2015-11-11 11:08:03 8052 [Note] InnoDB: Reading tablespace information from the .ibd files...
2015-11-11 11:08:03 8052 [ERROR] InnoDB: Attempted to open a previously opened tablespace. Previous tablespace coldatabase/item uses space ID: 3 at filepath: .\coldatabase\item.ibd. Cannot open tablespace mysql/slave_relay_log_info which uses space ID: 3 at filepath: .\mysql\slave_relay_log_info.ibd
InnoDB: Error: could not open single-table tablespace file .\mysql\slave_relay_log_info.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.

我也遇到过类似的问题,我用两种方法解决了它,我要提到两种方法中比较好的一种

  • 将c:\wamp文件夹复制到任何其他安全位置
  • 让原始的c:\wamp文件夹保持原样
  • 从以前安装的包中安装wamp服务器
  • 启动wamp服务器
  • 完成
    (将c:\wamp文件夹复制到任何其他安全位置只是为了紧急情况,以防出现问题)。

    下载、安装、配置并使用根凭据登录数据库。这将是一种比您目前的情况更有用的调试方法。WAMP是一个组织严密、高度挑剔的系统,对新手来说非常好,但它太容易“断裂”。稍后,我强烈建议您分别安装Apache、PHP和MySQL。听起来您的数据库在系统崩溃中已经损坏了。查看
    mysql日志
    wamp菜单上有一个链接可以编辑该文件。在你的问题中添加你在该文件底部看到的内容,即最后一次启动attempt@MonkeyZeus在WAMPServer或XAMPP中,没有什么比您自己安装所有东西更挑剔的了。在本例中,如果数据库损坏,MySQL Workbench将毫无帮助。如果MySQL无法启动MySQL Workbench,那么MySQL Workbench将无法看到数据库我已经编辑了我的问题@RiggsFolly您是否尝试了针对表损坏的3种建议修复方法中的任何一种?