【发布时间】:2023-03-24 22:13:01
【问题描述】:
我正在开发我的网站,apache和mysql都运行正常,直到突然,数据库无法连接。我检查了我的 XAMPP 控制面板,MySQL 已经停止运行。我搜索了解决方案here 和其他一些关于 SO 的类似问题,但我找不到适合我的解决方案。以下是 mysql_error.log 文件的内容:
2016-04-15 20:30:18 150c InnoDB: Warning: Using innodb_additional_mem_pool_size is DEPRECATED. This option may be removed in future releases, together with the option innodb_use_sys_malloc and with the InnoDB's internal memory allocator.
160415 20:30:18 [Note] InnoDB: Using mutexes to ref count buffer pool pages
160415 20:30:18 [Note] InnoDB: The InnoDB memory heap is disabled
160415 20:30:18 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
160415 20:30:18 [Note] InnoDB: Memory barrier is not used
160415 20:30:18 [Note] InnoDB: Compressed tables use zlib 1.2.3
160415 20:30:18 [Note] InnoDB: Not using CPU crc32 instructions
160415 20:30:18 [Note] InnoDB: Initializing buffer pool, size = 16.0M
160415 20:30:18 [Note] InnoDB: Completed initialization of buffer pool
160415 20:30:18 [Note] InnoDB: Restoring page 0 of tablespace 0
160415 20:30:18 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
160415 20:30:18 [ERROR] InnoDB: space header page consists of zero bytes in data file D:\xampp\mysql\data\ibdata1
160415 20:30:18 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
160415 20:30:18 [ERROR] Plugin 'InnoDB' init function returned error.
160415 20:30:18 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160415 20:30:18 [Note] Plugin 'FEEDBACK' is disabled.
160415 20:30:18 [ERROR] Unknown/unsupported storage engine: InnoDB
160415 20:30:18 [ERROR] Aborting
160415 20:30:18 [Note] D:\xampp\mysql\bin\mysqld.exe: Shutdown complete
到目前为止我所尝试的:
- 我已将端口地址从 3306 更改为 3307、3310。没有用。
- 我删除了 ibdata1 文件。尽管在我尝试重新启动 MySQL 后该文件重新出现在其位置。 (我后来才知道,如果缺少 ibdata1,我会丢失我的表。我不希望这样。)
为什么 MySQL 突然遇到问题以及如何启动 MySQL 而不会丢失我的表?
【问题讨论】: