首页 > 解决方案 > XAMPP 控制面板 v 3.3.0 - 错误:MySQL 意外关闭

问题描述

今天试图启动我的 apache 服务器并且 MySQL 没有运行,这是它显示的错误:

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

这是来自 xampp 控制面板的日志错误:

2021-06-10 10:15:28 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2021-06-10 10:15:28 0 [Note] InnoDB: Uses event mutexes
2021-06-10 10:15:28 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-06-10 10:15:28 0 [Note] InnoDB: Number of pools: 1
2021-06-10 10:15:28 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-06-10 10:15:28 0 [Note] InnoDB: Initializing buffer pool, total size = 16M, instances = 1, chunk size = 16M
2021-06-10 10:15:28 0 [Note] InnoDB: Completed initialization of buffer pool
2021-06-10 10:15:29 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-06-10 10:15:29 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-06-10 10:15:29 0 [Note] InnoDB: Setting file 'C:\xampp\mysql\data\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-06-10 10:15:29 0 [Note] InnoDB: File 'C:\xampp\mysql\data\ibtmp1' size is now 12 MB.
2021-06-10 10:15:29 0 [Note] InnoDB: Waiting for purge to start
2021-06-10 10:15:29 0 [Note] InnoDB: 10.4.19 started; log sequence number 47133; transaction id 8
2021-06-10 10:15:29 0 [Note] InnoDB: Loading buffer pool(s) from C:\xampp\mysql\data\ib_buffer_pool
2021-06-10 10:15:29 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-06-10 10:15:29 0 [Note] InnoDB: Buffer pool(s) load completed at 210610 10:15:29
2021-06-10 10:15:29 0 [Note] Server socket created on IP: '::'.

试着:

  1. 将文件夹 mysql/data 重命名为 mysql/data_old (可以使用任何名称)
  2. 创建一个新文件夹 mysql/data
  3. 将驻留在 mysql/backup 中的内容复制到新的 mysql/data 文件夹
  4. 将 mysql/data_old 中的所有数据库文件夹复制到 mysql/data(从 data_old 中跳过 mysql、performance_schema 和 phpmyadmin 文件夹)
  5. 最后从 mysql/data_old 复制 ibdata1 文件并将其替换到 mysql/data 文件夹中
  6. 从 XAMPP 控制面板启动 MySQL

也试过:

  1. 退出 Xampp 服务器
  2. 转到您的 C:\xampp\mysql\data 目录
  3. 删除ibdata1文件
  4. 重新启动 xampp 服务器

谁知道解决方法?

标签: phpmysqlxampp

解决方案


顺便说一句,当您在 xampp 仍在运行的情况下关闭计算机时,可能会发生这种情况以供将来参考。


推荐阅读