XAMPP下MySQL无法启动:缓冲池加载异常问题求助
XAMPP中MySQL启动失败的故障排查与解决
故障现象
启动XAMPP中的MySQL服务时失败,控制台提示服务意外关闭。
相关日志信息
XAMPP控制台日志
10:55:53 ق.ظ [mysql] Status change detected: stopped 10:55:53 ق.ظ [mysql] Error: MySQL shutdown unexpectedly. 10:55:53 ق.ظ [mysql] This may be due to a blocked port, missing dependencies, 10:55:53 ق.ظ [mysql] improper privileges, a crash, or a shutdown by another method. 10:55:53 ق.ظ [mysql] Press the Logs button to view error logs and check 10:55:53 ق.ظ [mysql] the Windows Event Viewer for more clues 10:55:53 ق.ظ [mysql] If you need more help, copy and post this 10:55:53 ق.ظ [mysql] entire log window on the forums
MySQL错误日志
2022-09-29 10:55:51 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions 2022-09-29 10:55:51 0 [Note] InnoDB: Uses event mutexes 2022-09-29 10:55:51 0 [Note] InnoDB: Compressed tables use zlib 1.2.11 2022-09-29 10:55:51 0 [Note] InnoDB: Number of pools: 1 2022-09-29 10:55:51 0 [Note] InnoDB: Using SSE2 crc32 instructions 2022-09-29 10:55:51 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M 2022-09-29 10:55:51 0 [Note] InnoDB: Completed initialization of buffer pool 2022-09-29 10:55:51 0 [Note] InnoDB: 128 out of 128 rollback segments are active. 2022-09-29 10:55:51 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2022-09-29 10:55:51 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ... 2022-09-29 10:55:51 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB. 2022-09-29 10:55:51 0 [Note] InnoDB: Waiting for purge to start 2022-09-29 10:55:51 0 [Note] InnoDB: 10.4.22 started; log sequence number 1463371418; transaction id 661011 2022-09-29 10:55:51 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool 2022-09-29 10:55:51 0 [Note] Plugin 'FEEDBACK' is disabled. 2022-09-29 10:55:51 0 [Note] Server socket created on IP: '::'.
Windows事件查看器日志
Log Name: Application Source: MariaDB Date: 07/07/1401 11:32:33 ق.ظ Event ID: 100 Task Category: None Level: Error Keywords: Classic User: N/A Computer: DESKTOP-33KUAJ5 Description: The description for Event ID 100 from source MariaDB cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: Aborting The message resource is present but the message was not found in the message table Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="MariaDB" /> <EventID Qualifiers="49152">100</EventID> <Version>0</Version> <Level>2</Level> <Task>0</Task> <Opcode>0</Opcode> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2022-09-29T08:02:33.6734979Z" /> <EventRecordID>20403</EventRecordID> <Correlation /> <Execution ProcessID="0" ThreadID="0" /> <Channel>Application</Channel> <Computer>DESKTOP-33KUAJ5</Computer> <Security /> </System> <EventData> <Data>Aborting </Data> </EventData> </Event>
原因分析
从日志来看,MySQL初始化完成后突然中止(事件查看器显示Aborting),常见触发原因包括:
- 3306端口被其他进程占用,导致MySQL无法绑定端口
- InnoDB临时表文件
ibtmp1损坏,服务启动时无法正常读写 - XAMPP的MySQL进程没有足够权限写入
data目录 - 系统中残留未关闭的MySQL/MariaDB进程,导致端口或资源被占用
解决方法
1. 检查并释放3306端口
- 打开命令提示符(CMD),执行命令:
netstat -ano | findstr :3306 - 记录输出结果中的PID,打开任务管理器,找到对应PID的进程并结束(若为其他MySQL/MariaDB服务,直接停止该服务)
- 重新启动XAMPP的MySQL服务
2. 修复InnoDB临时表文件
- 停止XAMPP所有服务
- 进入
C:\xampp\mysql\data目录,删除ibtmp1文件 - 重启XAMPP的MySQL服务,系统会自动重建该临时表文件
3. 调整目录权限
- 右键点击
C:\xampp\mysql\data目录,选择「属性」→「安全」选项卡 - 检查当前用户是否拥有「写入」权限,若没有则点击「编辑」添加对应权限,勾选「完全控制」或「写入」后保存
- 重新启动MySQL服务
4. 清理残留进程
- 打开任务管理器,切换到「详细信息」标签页
- 找到所有名为
mysqld.exe或mariadb.exe的进程,右键选择「结束任务」 - 重新启动XAMPP的MySQL服务
内容的提问来源于stack exchange,提问作者joomlaboy
相关产品推荐
相关产品推荐

