我知道这个问题已在这里被多次询问,我搜索了很多并找到了各种答案,但仍然无法解决我的问题。
Apache在端口80上成功运行,但是当我尝试启动mysql时,它会给我以下错误消息。
13:36:13 [mysql] Error: MySQL shutdown unexpectedly.
13:36:13 [mysql] This may be due to a blocked port, missing dependencies,
13:36:13 [mysql] improper privileges, a crash, or a shutdown by another method.
13:36:13 [mysql] Press the Logs button to view error logs and check
13:36:13 [mysql] the Windows Event Viewer for more clues
13:36:13 [mysql] If you need more help, copy and post this
13:36:13 [mysql] entire log window on the forums
日志文件
140215 13:36:13 [Note] Plugin 'FEDERATED' is disabled.
140215 13:36:13 InnoDB: The InnoDB memory heap is disabled
140215 13:36:13 InnoDB: Mutexes and rw_locks use Windows interlocked functions
140215 13:36:13 InnoDB: Compressed tables use zlib 1.2.3
140215 13:36:13 InnoDB: Initializing buffer pool, size = 16.0M
140215 13:36:13 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file D:\xampp\mysql\data\ibdata1
140215 13:36:13 InnoDB: Could not open or create data files.
140215 13:36:13 InnoDB: If you tried to add new data files, and it failed here,
140215 13:36:13 InnoDB: you should now edit innodb_data_file_path in my.cnf back
140215 13:36:13 InnoDB: to what it was, and remove the new ibdata files InnoDB created
140215 13:36:13 InnoDB: in this failed attempt. InnoDB only wrote those files full of
140215 13:36:13 InnoDB: zeros, but did not yet use them in any way. But be careful: do not
140215 13:36:13 InnoDB: remove old data files which contain your precious data!
140215 13:36:13 [ERROR] Plugin 'InnoDB' init function returned error.
140215 13:36:13 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140215 13:36:13 [ERROR] Unknown/unsupported storage engine: InnoDB
140215 13:36:13 [ERROR] Aborting
请指导我如何解决此问题。
此致 阿夫塔卜
答案 0 :(得分:1)
你可能想看看这里: https://superuser.com/questions/653953/cant-start-mysql-xampp-after-installing-on-external-drive
希望您在删除文件之前复制一份文件?
答案 1 :(得分:1)
我遇到了类似的错误,并设法解决了这个错误:
转到Xampp / mysql / bin / my.ini
添加以下行:
innodb_force_recovery = 1
(我认为任何> 0都可以在这里工作,但是...为了安全起见,备份文件可能很方便。)
您现在应该能够成功启动mySQL服务。