错误:MySQL 意外关闭 - XAMPP

Posted

技术标签:

【中文标题】错误:MySQL 意外关闭 - XAMPP【英文标题】:Error: MySQL shutdown unexpectedly - XAMPP 【发布时间】:2018-03-29 23:51:46 【问题描述】:

我在 win10 机器上使用 xampp 运行 mysql 时遇到问题。 这是 xampp 消息:

Error: MySQL shutdown unexpectedly.
1:33:01  [mysql]    This may be due to a blocked port, missing dependencies, 
1:33:01  [mysql]    improper privileges, a crash, or a shutdown by another method.
1:33:01  [mysql]    Press the Logs button to view error logs and check
1:33:01  [mysql]    the Windows Event Viewer for more clues
1:33:01  [mysql]    If you need more help, copy and post this
1:33:01  [mysql]    entire log window on the forums

这是我的 mysql.log:

017-10-18 03:52:49 efc 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.
2017-10-18  3:52:49 3836 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
2017-10-18  3:52:49 3836 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-10-18  3:52:49 3836 [Note] InnoDB: The InnoDB memory heap is disabled
2017-10-18  3:52:49 3836 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2017-10-18  3:52:49 3836 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2017-10-18  3:52:49 3836 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-10-18  3:52:49 3836 [Note] InnoDB: Using generic crc32 instructions
2017-10-18  3:52:49 3836 [Note] InnoDB: Initializing buffer pool, size = 16.0M
2017-10-18  3:52:49 3836 [Note] InnoDB: Completed initialization of buffer pool
2017-10-18  3:52:49 3836 [Note] InnoDB: Restoring page 0 of tablespace 0
2017-10-18  3:52:49 3836 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
2017-10-18  3:52:49 3836 [ERROR] InnoDB: space header page consists of zero bytes in data file C:\xampp\mysql\data\ibdata1
2017-10-18  3:52:49 3836 [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!
2017-10-18  3:52:49 3836 [ERROR] Plugin 'InnoDB' init function returned error.
2017-10-18  3:52:49 3836 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-10-18  3:52:49 3836 [Note] Plugin 'FEEDBACK' is disabled.
2017-10-18  3:52:49 3836 [ERROR] Unknown/unsupported storage engine: InnoDB
2017-10-18  3:52:49 3836 [ERROR] Aborting

我尝试重新初始化 mysql 数据文件夹,从中删除 ibdata1、ib_log 文件,但没有任何成功。 任何建议都非常感谢。

【问题讨论】:

您是否尝试过更改 rinuthomaz 在***.com/questions/15169861/… 上指定的端口 有人回答这个问题吗?,有同样的问题,清除ib_logfile0ib_logfile1ib_logibdata1 第一次获得成功,重启后得到同样的错误。 【参考方案1】:

通过安装 5.6.35 / php 5.6.35 - XAMPP 解决

使用 windows 10、xampp 7.2.2 也有同样的问题。

    备份 htdocs 项目 已卸载 XAMPP 7.2.x 已安装 XAMPP 5.6.x 已将备份项目粘贴到 htdocs 遇到 Apache 端口号问题,然后在 httpd.conf 中将 80 更改为 8080 工作正常!

【讨论】:

我最终使用了不同的操作系统,所以我不知道这是否真的适用于我的情况,我会接受它,因为它可能对其他人有帮助。

以上是关于错误:MySQL 意外关闭 - XAMPP的主要内容,如果未能解决你的问题,请参考以下文章

Xampp 无法在 localhost 中运行 MySQL! - “错误:MySQL 意外关闭。”

错误:MySQL 意外关闭。尝试在 Xampp 上启动 Mysql

XAMPP-MYSQL 意外关闭

XAMPP MySQL 意外关闭 - 日志中没有错误

错误:MySQL 意外关闭。在 xampp 控制上

错误:MySQL 意外关闭。 XAMPP,如何修复损坏的表