【发布时间】:2014-03-14 19:13:21
【问题描述】:
我知道这个问题在这里被问过很多次,我搜索了很多,找到了各种答案,但仍然无法解决我的问题。
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
请指导我如何解决此问题。
问候, 阿夫塔布
【问题讨论】:
-
您的数据库文件可能已损坏(D:\xampp\mysql\data\ibdata1)?或者你指向了错误的路径
-
我在帖子中发现了
ibdata文件删除后它会正常工作,这就是我删除它的原因。 -
当您删除了 ibdata1 时,您是否也从 MySQL 目录中删除了 ib_logfile0、ib_logfile1?如果不尝试这样做,让 InnoDB 再次加载并启动 MySQL。为了预防起见,您可以保留这些文件的副本,而不是直接删除
-
我已经用 ibdata1 删除了 logfile0、logfile1。现在它没有给我任何错误消息,并在 phpmyadmin 中显示数据库名称,但是当我单击任何表名时,它会显示“abc 表为空”。请告诉我为什么它不显示表格数据。
-
让我猜猜。因为您的表数据在您已删除的 ibdata1 中?