错误:MySQL 在 XAMPP SERVER 中意外关闭

问题描述 投票:0回答:2

我正在开发 XAMPP 服务器。我昨天完成了工作,今天打开了我的系统。现在,当我从 XAMPP 控制面板启动 MySQL 时,我收到错误:

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

MySQL 日志文件 - MySQL 错误

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

昨天工作得很顺利。昨天我什么也没做。 我尝试了解决方案 - 如何解决“错误:MySQL 意外关闭”?

尝试解决方案后,它可以工作,但是引擎中不存在许多表。 喜欢 -

Table 'database.meditemimg' doesn't exist in engine

我的数据库中有 10 个表。存在 3 个表,但应用此方法后 7 个表不存在:

Rename the folder mysql/data to mysql/data_old (you can use any name)
Create a new folder mysql/data
Copy the content that resides in mysql/backup to the new mysql/data folder
Copy all your database folders that are in mysql/data_old to mysql/data (skipping the mysql, performance_schema, and phpmyadmin folders from data_old)
Finally copy the ibdata1 file from mysql/data_old and replace it inside mysql/data folder
Start MySQL from XAMPP control panel

排序规则更改为 7 个表正在使用。

还有其他方法修复 MySQL 关闭错误吗?

mysql server xampp localhost
2个回答
0
投票

mysql/bin 扩展 my.ini

上的缓冲区大小相关值

答案就在这里—— https://stackoverflow.com/a/72721411/3178959


0
投票

首先尝试使用 XAMPP 附带的 MySQL 备份文件夹。因此,请执行后续步骤:

  1. 将文件夹 mysql/data 重命名为 mysql/data_old
  2. 复制 mysql/backup 文件夹并将其命名为 mysql/data
  3. 将所有数据库文件夹从 mysql/data_old 复制到 mysql/data (除了 mysql、performance_schema 和 phpmyadmin 文件夹)
  4. 将 mysql/data_old/ibdata1 文件复制到 mysql/data 文件夹中
  5. 从 XAMPP 控制面板启动 MySQL
© www.soinside.com 2019 - 2024. All rights reserved.