XAMPP出现Error: MySQL shutdown unexpectedly.

XAMPP报错:

10:09:11 [mysql] Error: MySQL shutdown unexpectedly.

10:09:11 [mysql] This may be due to a blocked port, missing dependencies,

10:09:11 [mysql] improper privileges, a crash, or a shutdown by another method.

10:09:11 [mysql] Press the Logs button to view error logs and check

10:09:11 [mysql] the Windows Event Viewer for more clues

10:09:11 [mysql] If you need more help, copy and post this

10:09:11 [mysql] entire log window on the forums

点击logs,拉到最下方。查看错误日志:

2025-12-12 10:01:23 0 [Note] Starting MariaDB 10.4.32-MariaDB source revision c4143f909528e3fab0677a28631d10389354c491 as process 22148

2025-12-12 10:01:23 0 [ERROR] mysqld.exe: File 'D:\17_Program_installation\xampp\mysql\data\aria_log.00000002' not found (Errcode: 2 "No such file or directory")

2025-12-12 10:01:23 0 [ERROR] mysqld.exe: Aria engine: log initialization failed

2025-12-12 10:01:23 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.

2025-12-12 10:01:23 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions

2025-12-12 10:01:23 0 [Note] InnoDB: Uses event mutexes

2025-12-12 10:01:23 0 [Note] InnoDB: Compressed tables use zlib 1.3

2025-12-12 10:01:23 0 [Note] InnoDB: Number of pools: 1

2025-12-12 10:01:23 0 [Note] InnoDB: Using SSE2 crc32 instructions

2025-12-12 10:01:23 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M

2025-12-12 10:01:23 0 [Note] InnoDB: Completed initialization of buffer pool

2025-12-12 10:01:23 0 [Note] InnoDB: 128 out of 128 rollback segments are active.

2025-12-12 10:01:23 0 [Note] InnoDB: Creating shared tablespace for temporary tables

2025-12-12 10:01:23 0 [Note] InnoDB: Setting file 'D:\17_Program_installation\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...

2025-12-12 10:01:23 0 [Note] InnoDB: File 'D:\17_Program_installation\xampp\mysql\data\ibtmp1' size is now 12 MB.

2025-12-12 10:01:23 0 [Note] InnoDB: Waiting for purge to start

2025-12-12 10:01:23 0 [Note] InnoDB: 10.4.32 started; log sequence number 30526378; transaction id 35332

2025-12-12 10:01:23 0 [Note] InnoDB: Loading buffer pool(s) from D:\17_Program_installation\xampp\mysql\data\ib_buffer_pool

2025-12-12 10:01:23 0 [Note] Plugin 'FEEDBACK' is disabled.

2025-12-12 10:01:23 0 [Note] InnoDB: Buffer pool(s) load completed at 251212 10:01:23

2025-12-12 10:01:23 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded

2025-12-12 10:01:23 0 [ERROR] Failed to initialize plugins.

2025-12-12 10:01:23 0 [ERROR] Aborting

原因为:MariaDB 的 Aria 存储引擎在非正常关闭后,日志序列号(LSN)不一致,导致每次启动都"期待"下一个编号的日志文件,但实际没有正确初始化。

修复:

PowerShell(以管理员身份运行) 中执行:

复制代码
# 1. 确保 MySQL 已完全停止
taskkill /f /im mysqld.exe

# 2. 删除所有 Aria 相关文件(关键!包括控制文件)
Remove-Item -Force "你的路径\xampp\mysql\data\aria_log.*"
Remove-Item -Force "你的路径\xampp\mysql\data\aria_log_control"

# 3. 【重要】确保 mysql 系统表不依赖 Aria(使用 MyISAM)
#    如果你之前恢复过 backup\mysql,这步可跳过
#    否则请执行:
#    Remove-Item -Recurse -Force "D:\...\data\mysql"
#    Copy-Item -Recurse "D:\...\backup\mysql" "D:\...\data\mysql"

执行后在XAMPP,点击Start,成功启动。

相关推荐
AC赳赳老秦31 分钟前
DeepSeek 私有化部署避坑指南:敏感数据本地化处理与合规性检测详解
大数据·开发语言·数据库·人工智能·自动化·php·deepseek
myzshare1 小时前
实战分享:我是如何用SSM框架开发出一个完整项目的
java·mysql·spring cloud·微信小程序
YMatrix 官方技术社区1 小时前
YMatrix 存储引擎解密:MARS3 存储引擎如何超越传统行存、列存实现“时序+分析“场景性能大幅提升?
开发语言·数据库·时序数据库·数据库架构·智慧工厂·存储引擎·ymatrix
辞砚技术录2 小时前
MySQL面试题——索引2nd
数据库·mysql·面试
linweidong2 小时前
C++thread pool(线程池)设计应关注哪些扩展性问题?
java·数据库·c++
墨笔之风3 小时前
java后端根据双数据源进行不同的接口查询
java·开发语言·mysql·postgres
欧亚学术3 小时前
突发!刚刚新增17本期刊被剔除!
数据库·论文·sci·期刊·博士·scopus·发表
黑白极客4 小时前
怎么给字符串字段加索引?日志系统 一条更新语句是怎么执行的
java·数据库·sql·mysql·引擎
大厂技术总监下海4 小时前
数据湖加速、实时数仓、统一查询层:Apache Doris 如何成为现代数据架构的“高性能中枢”?
大数据·数据库·算法·apache
LeenixP4 小时前
RK3576-Debian12删除userdata分区
linux·运维·服务器·数据库·debian·开发板