You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

XAMPP中MySQL意外关闭无法启动求助(附错误日志)

Fixing MySQL Shutdown Unexpectedly in XAMPP

Hey there, let's tackle this MySQL shutdown issue in XAMPP together. Looking at your logs, InnoDB completes its initialization steps just fine—sets up the buffer pool, creates the ibtmp1 temporary tablespace, and even loads the buffer pool from disk—but MySQL still crashes unexpectedly. Here are the most reliable fixes to try:

1. Check for Port 3306 Conflicts

MySQL uses port 3306 by default, and if another program is using this port, MySQL can't start. To check:

  • Open Command Prompt as Administrator
  • Run this command to find processes using port 3306:
    netstat -ano | findstr :3306
    
  • Note the PID number at the end of the line, then open Task Manager → Details tab, find that PID, right-click it, and select End Task.
  • Try restarting MySQL in XAMPP again.

2. Repair the InnoDB Temporary Tablespace (ibtmp1)

The ibtmp1 file (your logs mention it being created) can get corrupted, causing InnoDB to fail silently. Fix this:

  • Stop all running XAMPP services first
  • Navigate to C:\xampp\mysql\data\ and delete the ibtmp1 file
  • Start MySQL again—InnoDB will automatically recreate a fresh ibtmp1 file

3. Verify Directory Permissions

XAMPP's MySQL needs full read/write access to its data directory. To fix permissions:

  • Right-click the C:\xampp\mysql\data folder → Properties → Security tab
  • Select your user account, then check the Full Control box under Allow
  • Click Apply and OK, then restart MySQL

4. Get More Details from Windows Event Viewer

XAMPP's error log doesn't show the root cause here, but Windows Event Viewer will have more specifics:

  • Press Win + R, type eventvwr.msc, and hit Enter
  • Expand Windows Logs → Application
  • Look for entries with MySQL in the Source column—these will tell you exactly why MySQL crashed (e.g., missing DLLs, corrupted system tables)

If none of these work, you can also try copying the my.ini file from C:\xampp\mysql\backup\ to C:\xampp\mysql\bin\ (overwrite the existing one) to reset MySQL's configuration to default.

内容的提问来源于stack exchange,提问作者Ethan Ocampo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 13:42:43